This topic was marked solved by its starter, on January 20th, 04:35 PM
cmd not working

Ali Ahmed

  • Full Member
  • Why so rude,be more rude
  • Posts: 101
cmd not working
«  »
I made this cmd it is working but itt arrests a player even if he has no wanted level
Code: [Select]
else if (cmd == "arrest") {
if( !text ) MessagePlayer("Error - /"+cmd+" Name/id", player );
else {
local plr = text != "" ? IsNum( text ) ? FindPlayer( text.tointeger() ) : FindPlayer( text ) : player;
if( !plr )MessagePlayer("Error - Unknown player", player );
else if ( plr.WantedLevel = 0 ) return MessagePlayer( RED+" This Player is Not Wanted",player );
else if ( DistanceFromPoint( player.Pos.x, player.Pos.y , plr.Pos.x, plr.Pos.y ) < 5 ) {         //DistanceFromPoint( float x1, float y1, float x2, float y2 )
plr.Pos = Vector( 392.96, -506.26, 9.39 );
}
else MessagePlayer(""+ plr.Name +" is far away.", player );
}
}
Need some Help pm me.Wanna see my server the name is Pakistan Theft Auto Reloaded

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 241
Re: cmd not working
« Reply #1,  »

Code: [Select]
  else if ( plr.WantedLevel = 0 ) return MessagePlayer( RED+" This Player is Not Wanted",player );
To
Code: [Select]
  else if ( plr.WantedLevel == 0 ) MessagePlayer( RED+" This Player is Not Wanted",player );
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

Ali Ahmed

  • Full Member
  • Why so rude,be more rude
  • Posts: 101
Re: cmd not working
« Reply #2,  »
Quote from Mohamed on January 20th, 03:49 PM
Code: [Select]
  else if ( plr.WantedLevel = 0 ) return MessagePlayer( RED+" This Player is Not Wanted",player );
To
Code: [Select]
  else if ( plr.WantedLevel == 0 ) MessagePlayer( RED+" This Player is Not Wanted",player );
Thanks bro it worked
Need some Help pm me.Wanna see my server the name is Pakistan Theft Auto Reloaded