[HELP] Car Respawner [+REP]
#2

Well, This is a command to respawn all cars for admins
Код:
	if(strcmp(cmd, "/respawnallcars", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 4)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "** you are not an admin...");
			    return 1;
			}
			new bool:unwanted[MAX_VEHICLES];
			for(new player=0; player<MAX_PLAYERS; player++)
     		{
            	if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
     		}
			for(new car = 1; car <= 1850; car++)
			{
				if(!unwanted[car]) SetVehicleToRespawn(car);
			}
			GameTextForAll("~w~Every Unused Car ~n~~g~Respawned!",5000,1);
			new y, m, d;
			new h,mi,s;
			getdate(y,m,d);
			gettime(h,mi,s);
			format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Respawned All Unused Cars",d,m,y,h,mi,s,sendername);
			AdminLog(string);
		}
		return 1;
	}
If you know how to set a timer for something then you will be able to set a timer that makes the above without a command.
Reply


Messages In This Thread
[HELP] Car Respawner [+REP] - by [PDS]DarioKeic - 21.03.2012, 11:24
Re: [HELP] Car Respawner [+REP] - by viddo - 21.03.2012, 11:39
Re: [HELP] Car Respawner [+REP] - by [PDS]DarioKeic - 21.03.2012, 11:48
Re: [HELP] Car Respawner [+REP] - by Kudoz - 21.03.2012, 11:53
Re: [HELP] Car Respawner [+REP] - by viddo - 21.03.2012, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)