25.01.2010, 17:12
Quote:
Originally Posted by OnTop2K9
You could also use switch.
pawn Код:
|
Switch vehicle model ID.
![Wink](images/smilies/wink.png)
pawn Код:
stock IsACopCar(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 427, 523, 596..599, 601: return 1;
}
return 0;
}
pawn Код:
stock IsACopCar(vehicleid)
{
new
ModelID = GetVehicleModel(vehicleid),
CopCarID[] = { 427, 523, 596, 597, 598, 599, 601 };
for(new i; i < sizeof CopCarID; i++)
{
if(ModelID == CopCarID[i]) return 1;
}
return 0;
}