SA-MP Forums Archive
Respawn vehicles bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Respawn vehicles bug (/showthread.php?tid=403951)



Respawn vehicles bug - Witnec - 01.01.2013

Code:
public car_respawnFact(factionID)
{
    new bool:unwanted[MAX_CAR];
	for(new player=MIN_PLAYERID; player<MAX_PLAYERS_CURRENT+1; player++)
	{
		if(IsPlayerConnected(player) && IsPlayerInAnyVehicle(player))
			{unwanted[GetPlayerVehicleID(player)]=true;}
	}
	for(new car=1; car<=totalcars; car++)
		{if(CarInfo[car][cFaction] == factionID && unwanted[car]) car_respawn(car,false);}
	return 1;
}
Code:
if(strcmp(subcmd,"faction",true)==0)
		{
		    tmp = strtok(cmdtext,idx);
		    if(!strlen(tmp)) { return 1; }
		    new factId = strval(tmp);
		    if(factId<1 || factId>16) { return 1; }
		    new factname[LITTLE_STRING];
		    fact_name(factId, factname);
		    car_respawnFact(factId);
		    format(string,sizeof(string),"[Info] Respawn of the vehicles of the faction %s by %s.",factname,playername);
		    SendClientMessageToAll(COLOR_AOOC, string);
		    return 1;
		}
Can some one help this command don't respawn the vehicles


Re : Respawn vehicles bug - Witnec - 01.01.2013

no one?


Re : Respawn vehicles bug - Witnec - 02.01.2013

please help me !


Re: Respawn vehicles bug - aslan890 - 02.01.2013

Try using another command if that one got bug