OnPlayerStateChange[SOLVED]
#1

i would like to set player wanted level by 1 if a civilian enters a civilian car. but if he enters a cop car his wanted level will go up by 4 stars...
how do i do that? pls help
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(gTeam[playerid] == TEAM_CIVILIAN)
	{
		if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
		{
 			new wanted = GetPlayerWantedLevel(playerid);
			new vehicleid = GetVehicleModel(playerid);
			switch(vehicleid)
  			{
		  			case 400: SetPlayerWantedLevel(playerid, wanted + 1);//landstalker
		  			case 401: SetPlayerWantedLevel(playerid, wanted + 1);//bravura
		            case 402: SetPlayerWantedLevel(playerid, wanted + 1);//buffalo
                    case 523: SetPlayerWantedLevel(playerid, wanted + 4);//Hpv-1000
                    case 598: SetPlayerWantedLevel(playerid, wanted + 4);//Cop Car LV
                               ...
             }
         }
     }
     return 1;

}
Reply


Messages In This Thread
OnPlayerStateChange[SOLVED] - by jamesbond007 - 16.06.2010, 05:23
Re: OnPlayerStateChange - by randomkid88 - 16.06.2010, 05:29
Re: OnPlayerStateChange - by jamesbond007 - 16.06.2010, 05:30
Re: OnPlayerStateChange - by randomkid88 - 16.06.2010, 05:34
Re: OnPlayerStateChange - by (SF)Noobanatior - 16.06.2010, 05:40
Re: OnPlayerStateChange - by jamesbond007 - 16.06.2010, 05:44
Re: OnPlayerStateChange - by randomkid88 - 16.06.2010, 05:49
Re: OnPlayerStateChange - by jamesbond007 - 16.06.2010, 05:53
Re: OnPlayerStateChange - by (SF)Noobanatior - 16.06.2010, 05:55
Re: OnPlayerStateChange - by jamesbond007 - 16.06.2010, 05:55

Forum Jump:


Users browsing this thread: 1 Guest(s)