Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Players[playerid][AdminLevel] >= 4)
- {
- new bool:unwanted[V_LIMIT];
- for(new player=0; player<MAX_PLAYERS; player++)
- {
- if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
- }
- for(new car = 1; car <= 268; car++)
- {
- if(!unwanted[car]) SetVehicleToRespawn(car);
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
- SendClientMessageToAll(COLOR_WHITE,string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use that command !");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment