12.05.2010, 19:57
1. How many cop cars will there be?
2. Which car is a cop car? However many lines of code there are with "copcars[?]", is your number of vehicles for number 1.
3. How do you define what is a cop car?
4.
Tried and tested, any more issues feel free to reply.
Код:
new copcars[0];
Код:
copcars[0] = AddStaticVehicle(...)
Код:
stock IsCopCar(vehicleid) { for(new i=0; i<sizeof(copcars); i++) { if(copcars[i] == vehicleid) return 1; } return 0; }
Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && IsCopCar(GetPlayerVehicleID(playerid))) { SendClientMessage(playerid,0xF08080AA,"You have been ejected."); RemovePlayerFromVehicle(playerid); return 1; }