cop car problem
#3

Quote:
Originally Posted by Jokel317
Hello all im having trouble with my cop system everytime a cop get`s in the cop car it say`s You Are Not A Police Officer! and ejects em I was wondering any problems with my cop car setup thank`s.
Код:
 if(newstate==PLAYER_STATE_DRIVER){
		new VID=GetPlayerVehicleID(playerid);
    if(JobCop[playerid] == 1){
		if(GetVehicleModel(VID) == 596 || GetVehicleModel(VID) == 597 || GetVehicleModel(VID) == 598 || GetVehicleModel(VID) == 599){
   	   RemovePlayerFromVehicle(playerid);
   	   SendClientMessage(playerid, COLOR_RED, "You Are Not A Police Officer!.");
   		}
 		}
	}
	return 1;
}
Change to:

pawn Код:
new JobCop[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
  new Skin = GetPlayerSkin(playerid);
  if(Skin == 285)
  {
  JobCop[playerid] = 1;
  }

  if(Skin != 285)
  {
  JobCop[playerid] = 0;
  }
  return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate==PLAYER_STATE_DRIVER)
  {
  new vid = GetPlayerVehicleID(playerid);

  if(JobCop[playerid] == 0)
  {
  if(GetVehicleModel(vid) == 596 || GetVehicleModel(vid) == 597 || GetVehicleModel(vid) == 598 || GetVehicleModel(vid) == 599)
  {
  RemovePlayerFromVehicle(playerid);
  SendClientMessage(playerid, COLOR_RED, "You Are Not A Police Officer!.");
  }
  }
  }
  return 1;
}
Reply


Messages In This Thread
cop car problem - by Jokel317 - 01.11.2009, 10:38
Re: cop car problem - by noahg - 01.11.2009, 17:14
Re: cop car problem - by TheNooB - 01.11.2009, 17:38
Re: cop car problem - by Jokel317 - 01.11.2009, 18:26
Re: cop car problem - by Jokel317 - 01.11.2009, 20:00
Re: cop car problem - by zimtar - 01.11.2009, 22:01
Re: cop car problem - by Jokel317 - 01.11.2009, 22:17
Re: cop car problem - by c-middia - 01.11.2009, 23:14

Forum Jump:


Users browsing this thread: 2 Guest(s)