24.02.2012, 19:17
pawn Code:
if(strcmp(cmdtext, "/respawncars", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
new inVeh = 0;
for(new i = 0; i < MAX_VEHICLES; i++)
{
for (new j = 0; j < MAX_PLAYERS; j++)
{
if (IsPlayerInVehicle(j, i))
{
inVeh = 1;
break;
}
}
if (inVeh != 1)
{
SetVehicleToRespawn(i);
}
inVeh = 0;
}
SendClientMessageToAll(COLOR_RED, "All vehicles has been respawned!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not RCON Admin");
}
return 1;
}