Help respawn cars +rep
#1

Hello , i have problem with /rac.

i want to don't respawn the trailers attach because, when i type /rac it respawns all cars including trailers.

i try many time to fix it, mm((
code:
Код:
forward RACtime();
public RACtime()
{
		new bool:unwanted[CAR_AMOUNT];
	    for(new player=0; player<MAX_PLAYERS; player++)
     	{
			 	if(IsPlayerConnected(player))
				{
					if(IsTrailerAttachedToVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
            		if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
				}
     	}
		for(new car = 1; car <= 420; car++)
		{
		    if(!unwanted[car]) SetVehicleToRespawn(car);
		}
}
Код:
CMD:rac(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!");
	if(IsPlayerConnected(playerid))
	{
		if(PlayerInfo[playerid][pAdmin] >= 3)
		{
				new sendername[MAX_PLAYER_NAME];
				new string[128];
		        GetPlayerName(playerid, sendername, sizeof(sendername));
		    	format(string, sizeof(string), "Vehiculele vor fi respawnate in 10 secunde de catre administrator %s!", sendername);
	     		SetTimer("RACtime", 10000, 0);
				ABroadCast(0xA9C4E4FF,string,1);
		}
	}
	return 1;
}
this code was before
Код:
public RACtime(playerid)
{
      for(new player=0; player<MAX_PLAYERS; player++)
      {
      if(!IsVehicleOccupied(player)) SetVehicleToRespawn(player);
      }
      for(new car = 1; car <= 1300; car++)
      {
          if(!IsVehicleOccupied(car)) SetVehicleToRespawn(car);

      }
      return 1;
}
I hope any can help me. , Thanks.
Reply


Messages In This Thread
Help respawn cars +rep - by KingPersona - 10.05.2015, 21:06
Re: Help respawn cars +rep - by Abagail - 10.05.2015, 21:13
Re: Help respawn cars +rep - by KingPersona - 10.05.2015, 21:26
Re: Help respawn cars +rep - by KingPersona - 11.05.2015, 11:46
Re: Help respawn cars +rep - by KingPersona - 11.05.2015, 17:14
Re: Help respawn cars +rep - by Jefff - 11.05.2015, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)