Remove all unused vehicles.
#3

Код:
  	if(strcmp(cmd, "/vehdespawn", true) == 0 || strcmp(cmd, "/rav", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 1)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that 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);
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "Server action: "COL_RED"All unused vehicles were respawned by Administrator %s.", RemoveUnderScore(playerid));
			SendClientMessageToAll(COLOR_RED,string);
		}
		return 1;
	}
Change;

if(PlayerInfo[playerid][pAdmin] < 1)

To;

if(PlayerInfo[playerid][pAdmin] < 0)

To make the command used by anyone, a higher number requires a higher admin level to use it
Reply


Messages In This Thread
Remove all unused vehicles. - by NicholasA - 22.05.2013, 16:09
Re: Remove all unused vehicles. - by Scenario - 22.05.2013, 16:14
Re: Remove all unused vehicles. - by whando - 22.05.2013, 18:02
Re: Remove all unused vehicles. - by CreativityLacker - 22.05.2013, 18:21
Re: Remove all unused vehicles. - by Scenario - 22.05.2013, 18:22
Re: Remove all unused vehicles. - by CreativityLacker - 22.05.2013, 18:26
Re: Remove all unused vehicles. - by Scenario - 22.05.2013, 20:35
Re: Remove all unused vehicles. - by CreativityLacker - 23.05.2013, 16:17
Re: Remove all unused vehicles. - by Scenario - 23.05.2013, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)