02.04.2011, 08:45
(
Последний раз редактировалось linuxthefish; 02.04.2011 в 09:26.
)
I am trying to make a command to destroy all vehicles in the server, exept vehicles with players in. The code i've got at the moment just destroys vehicles with players in!! Can anyone point me in the right direction?
pawn Код:
#include a_samp
#include zcmd
COMMAND:respawn(playerid, params[])
{
for(new players = 0; players < MAX_PLAYERS; players++) //loop through players
for(new i = 0; i < MAX_VEHICLES; i++) //loop through vehicles
if(IsPlayerInVehicle(players, i) == 1)
{
//don't destroy this vehicle?
}
return 1;
}