Faction Car Respawn
#1

I have this command, that will respawn all the cars from a certain faction. The problem is, that it respawns the car, even if a player is driving it. What should i do, to respawn only the unused faction cars?


Код:
	if(strcmp(cmd, "/fvr", true)) //Brooklyn Family
    {
	  if(PlayerInfo[playerid][pLeader] == 6)
	  {
         SetVehicleToRespawn(brooklyncar[0]); SetVehicleToRespawn(brooklyncar[1]); SetVehicleToRespawn(brooklyncar[2]); SetVehicleToRespawn(brooklyncar[3]); SetVehicleToRespawn(brooklyncar[4]); SetVehicleToRespawn(brooklyncar[5]); SetVehicleToRespawn(brooklyncar[6]); SetVehicleToRespawn(brooklyncar[7]); SetVehicleToRespawn(brooklyncar[8]); SetVehicleToRespawn(brooklyncar[9]);
         for(new i = 0; i < MAX_PLAYERS; i ++)
         {
		   if(PlayerInfo[i][pMember] == 6 ||PlayerInfo[i][pLeader] == 6)
		   {
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), " All faction cars have been respawned by Leader %s.", sendername);
                SendClientMessage(i,COLOR_LIGHTBLUE,string);
           }
   		 }

      }
      else
      {
		SendClientMessage(playerid,COLOR_GREY," You are not the leader of an illegal faction !");
	  }
	}
Reply


Messages In This Thread
Faction Car Respawn - by ThomasMann - 24.09.2014, 14:07
Re: Faction Car Respawn - by SWGamer - 24.09.2014, 15:07
Re: Faction Car Respawn - by MateiMatei - 11.03.2015, 20:14
Re: Faction Car Respawn - by lean1337 - 12.03.2015, 01:24
Re: Faction Car Respawn - by Abagail - 12.03.2015, 01:31

Forum Jump:


Users browsing this thread: 2 Guest(s)