04.03.2013, 10:39
Hello Akcent, try that:
Edit: You can do the code that the user above wrote.
pawn Код:
if(!strcmp(cmd, "/respawnallcars", true) || !strcmp(cmd, "/rac", true)) //
{
if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
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 < 400; car++)
{
if(!unwanted[car] && !IsATLCar(car) && !IsATrailer(car)) SetVehicleToRespawn(car);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " Toate vehicule sau respawnat de %s.", sendername);
BroadCast(COLOR_WHITE,string);
return true;
}