30.07.2010, 22:16
pawn Код:
if(strcmp(cmd, "/zerarcarros123", true) == 0) // Tenta Assim
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, string, sizeof(string));
SendClientMessage(playerid,COLOR_GREEN,"Carros nгo usados foram restaurados !!!");
format(string,sizeof(string),"[AdminCMD]: Todos os carros voltaram POR: %s",string);
SendClientMessageToAll(COLOR_GREEN,string);
GameTextForPlayer(playerid,"~p~Carros Restaurados",4000,6);
new bool:unwanted[2000];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 3; car <= 639; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
for(new car = 640; car <= 2000; car++)
{
if(!unwanted[car]) DestroyVehicle(car);
}
}
return 1;
}
}