13.07.2015, 18:29
You should use this code under OnPlayerStateChange
Like this
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(pData[playerid][pAdmin] < 1)
{
if(vehicleid == 601)
{
ClearAnimations(playerid);
GameTextForPlayer(playerid,"Admin Vehicle",3000,4);
}
}
return 1;
}
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid )) == 601 && pData[playerid][pAdmin] < 1)
{
RemovePlayerFromVehicle( playerid );
GameTextForPlayer( playerid, "~r~~h~Admin Vehicle.!", 3000, 3 );
}
return 1;
}