RemovePlayerFromVehicle
#5

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(IsCopCar(GetPlayerVehicleID(playerid)) && !IsCopSkin(GetPlayerSkin(playerid)))//is its a law vehicle and he is not wearing a cop skin
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
}

stock IsCopCar(carid)
{
  new Operative[] = { 523, 427, 490, 528, 596, 597, 598, 599 };
  for(new i = 0; i < sizeof(Operative); i++)
  {
    if(GetVehicleModel(carid) == Operative[i]) return 1;
  }
  return 0;
}

stock IsCopSkin(skinid)
{
  new Operative[] = { 165, 166, 280, 281, 282, 283, 288, 284, 285, 286, 287 };
  for(new i = 0; i < sizeof(Operative); i++)
  {
    if(skinid == Operative[i]) return 1;
  }
  return 0;
}
Reply


Messages In This Thread
RemovePlayerFromVehicle - by Gooday - 06.12.2011, 12:08
Re: RemovePlayerFromVehicle - by JamesC - 06.12.2011, 12:20
Re: RemovePlayerFromVehicle - by THE_KNOWN - 06.12.2011, 12:20
Re: RemovePlayerFromVehicle - by Gooday - 06.12.2011, 12:21
Re: RemovePlayerFromVehicle - by THE_KNOWN - 06.12.2011, 12:28
Re: RemovePlayerFromVehicle - by SupremeCommander - 06.12.2011, 12:50
Re: RemovePlayerFromVehicle - by SupremeCommander - 06.12.2011, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)