26.01.2011, 20:33
A good start, but the problem is that you compare with a single = in the if. In pawn, a single = is used only to assign values to an variable. To compare them, use double =
Another minor mistake is that 'state' is a pawn keyword and you cant use it as variable name, just change it like this and it will work.
Another minor mistake is that 'state' is a pawn keyword and you cant use it as variable name, just change it like this and it will work.
pawn Код:
new playerstate = GetPlayerState(playerid); // Assigning the value to the variable, so a single = is correct
if(playerstate == PLAYER_STATE_DRIVER) //to check if two values are equal use two =