SA-MP Forums Archive
a little help here! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: a little help here! (/showthread.php?tid=475496)



a little help here! - Another1 - 13.11.2013

pawn Код:
COMMAND:eject(playerid,params[])
{
   new id;
   if(sscanf(params,"u", id)) return SCM(playerid, RED, "Eject player from vehicle: /eject <playerid>");
   if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
   if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, RED, "You are not in vehicle");
   if(playerState == PLAYER_STATE_PASSANGER)
   {
     SCM(playerid, RED, "You are not driver");
   }
   RemovePlayerFromVehicle(id);
   return 1;
}
pawn Код:
C:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(557) : error 017: undefined symbol "playerState"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase



Re: a little help here! - Avi Raj - 13.11.2013

Make it this :-
pawn Код:
COMMAND:eject(playerid,params[])
{
   new id;
   if(sscanf(params,"u", id)) return SCM(playerid, RED, "Eject player from vehicle: /eject <playerid>");
   if(!IsPlayerConnected(playerid)) return SCM(playerid, RED, "Player is not connected");
   if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, RED, "You are not in vehicle");
   if(PlayerState == PLAYER_STATE_PASSANGER)
   {
     SCM(playerid, RED, "You are not driver");
   }
   RemovePlayerFromVehicle(id);
   return 1;
}



Re: a little help here! - AlonzoTorres - 13.11.2013

Where does playerState come from?