23.03.2013, 01:20
Try this.
Needed Plugins:
pawn Код:
CMD:respawncars(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
for(new i=0; i<MAX_VEHICLES; i++)
{
new vehs;
foreach(Player, x)
{
if(GetPlayerVehicleID(x) == i)
{
vehs = 1;
}
}
if(!vehs)
{
SetVehicleToRespawn(i);
}
vehs = 0;
}
format(string, sizeof(string), "AdmCmd: %s has respawned all unused vehicles.", RPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
return 1;
}
pawn Код:
- Scanff
- foreach