16.12.2014, 19:01
with zcmd:
edit it and add admin's variable check as your wish.
pawn Код:
CMD:cleanvehicles(playerid, params[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new a = 0; a < MAX_VEHICLES; a++)
{
if(!IsPlayerInVehicle(i, a) && i != INVALID_PLAYER_ID && a != INVALID_VEHICLE_ID)
{
SetVehicleToRespawn(a);
SendClientMessageToAll(-1, "Unused vehicles successfully respawned"); // debugging
}
}
}
return 1;
}