Only police can enter vehicle
#4

Quote:
Originally Posted by Sellize
Посмотреть сообщение
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
     {
        new 
newcar GetPlayerVehicleID(playerid);
        if(
CopCar(newcar))
        {
             if (
gTeam[playerid] != TEAM_COPS){
                
RemovePlayerFromVehicle(playerid);
                
SendClientMessage(playeridCOLOR_RED"You're not in the police team"); return 1; }
            
// continued code if the player is a cop
        
}
    }
    return 
1;

Lol i just realize to put it on OnPlayerStateChange instead of onplayernetervehicle thx!
Reply


Messages In This Thread
Only police can enter vehicle - by N0FeaR - 10.10.2015, 09:31
Re: Only police can enter vehicle - by Dusan01 - 10.10.2015, 09:36
Re: Only police can enter vehicle - by Sellize - 10.10.2015, 09:39
Re: Only police can enter vehicle - by N0FeaR - 10.10.2015, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)