Respawning vehicles
#6

You can use this also, It doesn't spawn NPC vehicles
Код:
if(strcmp(cmd, "/RespawnAllCars", true) == 0 || strcmp(cmd, "/RAC", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 3)
			{
			    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: "COL_WHITE"All unused vehicles were respawned by Administrator %s.", sendername);
			SendClientMessageToAll(COLOR_YELLOW,string);
		}
		return 1;
	}
Reply


Messages In This Thread
Respawning vehicles - by rakshith122 - 14.02.2014, 16:11
Re: Respawning vehicles - by BigGroter - 14.02.2014, 16:13
Re: Respawning vehicles - by Clad - 14.02.2014, 16:14
Re: Respawning vehicles - by Konstantinos - 14.02.2014, 16:14
Re: Respawning vehicles - by rakshith122 - 14.02.2014, 16:26
Re: Respawning vehicles - by Clad - 14.02.2014, 16:29
Re: Respawning vehicles - by rakshith122 - 14.02.2014, 16:31
Re: Respawning vehicles - by Clad - 14.02.2014, 16:33

Forum Jump:


Users browsing this thread: 1 Guest(s)