If player is passenger - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: If player is passenger (
/showthread.php?tid=260726)
If player is passenger -
krisis32 - 10.06.2011
I got a securica car which id is 428. If player gets in the car as passenger he can do cmd /rbc . Then he will get some random robbery cash. But i cant figure out how to make so if the player is passenger and if he is in correct car. Thanks!
-Krisis32
Re: If player is passenger -
DRIFT_HUNTER - 10.06.2011
pawn Код:
CMD:rbc(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You must be in Securica to use these Command");
if(GetPlayerVehicleID(playerid) != 428) return SendClientMessage(playerid,red,"You must be in Securica to use these Command");
if(GetPlayerState(playerid) != PLAYER_STATE_PASSENGER) return SendClientMessage(playerid,red,"You must be passenger to use these Command");
//Your code
return 1;
}