04.11.2010, 21:32
hello guys, i made a code to prevent some vehicles from use...
It dosn't give me any errors or warnings, simply it just dont work in game.
Here is the code help plox :/
It dosn't give me any errors or warnings, simply it just dont work in game.
Here is the code help plox :/
Quote:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerVehicleID(playerid) == 541) { if(GetPlayerTeam(playerid) == 2) { SendClientMessage(playerid, COLOR_WHITE,"VIP: Premium vehicle entered"); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, 0x24FF0AB9,"VIP: YOU ARE NOT VIP!"); } if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerVehicleID(playerid) == 432) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED,"NO TANKS ALLOWED!"); } if(GetPlayerVehicleID(playerid) == 425) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED,"NO HUNTERS ALLOWED!"); } } } } return 1; } |