Whats wrong with the code?
#1

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 :/

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

Reply


Messages In This Thread
Whats wrong with the code? - by audifan00 - 04.11.2010, 21:32
Re: Whats wrong with the code? - by (SF)Noobanatior - 04.11.2010, 23:21
Re: Whats wrong with the code? - by Hal - 04.11.2010, 23:46
Re: Whats wrong with the code? - by audifan00 - 05.11.2010, 00:26

Forum Jump:


Users browsing this thread: 1 Guest(s)