31.07.2010, 00:36
pawn Код:
if (strcmp("/zerarcarros123", cmdtext, true, 10) == 0)
{
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;
}