Code:
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && isPoliceCar(vehicleid))
{
? ?//do something
}
stock isPoliceCar(vehicleid)
{
? ?new vehiclemodel = GetVehicleModel(vehicleid);
? ?switch(vehiclemodel)
? ?{
? ?case 595: return true;
? ?case 596: return true;
? ?case 597: return true;
? ?case 599: return true;
? ?}
? ?return false;
}
Edit:
I really forgot. Now fixed.