/vrespawn
#4

Ok, well i found this around the forums..

Код:
if(strcmp("/respawnallcars", cmdtext, true) == 0 || strcmp("/rac", cmdtext, true) == 0)
	{
	  if(IsPlayerConnected(playerid)) {
	    if(PlayerInfo[playerid][Level] < 5) {
			  SendClientMessage(playerid, red, "Error: you are not authorized to use this command");
			  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 <= 268; car++) if(!unwanted[car]) SetVehicleToRespawn(car);

			format(stringy, sizeof(stringy), "All unused cars have been respawned by %s", PlayerInfo[playerid][Name]);
			SendClientMessageToAll(orange, stringy);
		}
		return 1;
	}
Reply


Messages In This Thread
/vrespawn - by Anwix - 06.08.2009, 16:04
Re: /vrespawn - by gtalover12 - 06.08.2009, 16:14
Re: /vrespawn - by Anwix - 06.08.2009, 16:28
Re: /vrespawn - by gtalover12 - 06.08.2009, 16:59
Re: /vrespawn - by Anwix - 06.08.2009, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)