OnPlayerStateChange won't work
#1

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
	{
        case 601, 598, 427, 523, 497, 421:
        {
			if(GetTeam{playerid} == CLASS_CIV && newstate == PLAYER_STATE_DRIVER)
			{
			    if(GetPlayerLastVehicleID[playerid] != GetPlayerVehicleID(playerid))
			    {
	                new current_zone;
	        		current_zone = Player_Zone[playerid];
					new string[150];
		            format(string,sizeof(string),"[DISPATCH]: Suspect %s [%d] has just stolen a law enforcement vehicle at %s", GetName(playerid), playerid, ZoneNames[current_zone][zone_name]);
	                CopRadio(BLUE, string);
	                SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid) + 4);
	                SendClientMessage(playerid, RED, "Law enforcement vehicle theft [WANTED LEVEL INCREASED]");
	        		return 1;
        		}
			}
        }
}
This piece of code won't work. As a CLASS_CIV player enter a vehicle with those types (601, 598, 427, 523, 497, 421) he won't get SetPlayerWantedLevel(playerid,GetPlayerWantedLevel (playerid) + 4);

Any thoughts? Help will be rewarded with rep.
Reply


Messages In This Thread
OnPlayerStateChange won't work - by gdkparadox - 28.12.2014, 08:26
Re: OnPlayerStateChange won't work - by gdkparadox - 28.12.2014, 09:01
Re: OnPlayerStateChange won't work - by M4D - 28.12.2014, 09:15

Forum Jump:


Users browsing this thread: 2 Guest(s)