If player is passenger
#1

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
Reply
#2

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)