11.01.2011, 02:13
pawn Код:
if(strcmp(cmdtext,"/clearcars")==0)
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,magenta,"This command is not avaliable to you!");
{
SendClientMessageToAll(denim,"[SYSTEM]: All cars have been deleted!");
for(new veh;veh < MAX_VEHICLES; veh++)
{
if(!IsVehicleInUse(veh)) DestroyVehicle(veh);
}
}
return 1;
}
pawn Код:
stock IsVehicleInUse(vehicleid)
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVehicleID(i) == vehicleid)
return true;
}
}
return false;
}