The correct way to do this?
#2

pawn Код:
stock IsACopCar(vehicleid)
{
  if(GetVehicleModel(vehicleid) == 427 || GetVehicleModel(vehicleid) == 523 || GetVehicleModel(vehicleid) == 596
  || GetVehicleModel(vehicleid) == 597 || GetVehicleModel(vehicleid) == 598 || GetVehicleModel(vehicleid) == 599
  || GetVehicleModel(vehicleid) == 601) return true;
  return false;
}
|| stands for OR, so if vehicleModel-ID is 427 OR 523 OR 596 OR .. return true (1), otherwise return false (0).

This is just one of the ways which could be simple for you to understand.
Reply


Messages In This Thread
The correct way to do this? - by Torran - 25.01.2010, 15:17
Re: The correct way to do this? - by Correlli - 25.01.2010, 15:36
Re: The correct way to do this? - by On_Top_Non_Stop - 25.01.2010, 16:43
Re: The correct way to do this? - by smeti - 25.01.2010, 17:12
Re: The correct way to do this? - by Torran - 25.01.2010, 17:13

Forum Jump:


Users browsing this thread: 2 Guest(s)