18.05.2011, 01:09
pawn Код:
if(strcmp(cmd, "/resetarcarros", true) == 0 || strcmp(cmd, "/rc", true) == 0) //respawncars
{
if(PlayerInfo[playerid][pAdmin] < 4000)
{
SendClientMessage(playerid, COLOR_RED, "[Erro] Vocк nгo estб autorizado a usar este comando.");
return 1;
}
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player < MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= CAR_AMOUNT; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "|ADMIN|: O Administrador %s Resetou os carros).",sendername);
ABroadCast(COLOR_YELLOW,string,1);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}