SA-MP Forums Archive
Give all players items - 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: Give all players items (/showthread.php?tid=512773)



Give all players items - luckie12 - 12.05.2014

Hi, is it possible to give with a CMD all players the exact same weapon that i define in the script?


Thanks

-Luckie12


Re: Give all players items - Stinged - 12.05.2014

Loop.

You can use foreach (****** if you want to link) made by ******
Or you can just use this:
pawn Код:
for(new i; i != MAX_PLAYERS; i++)
{
    // Use i instead of player id here.
}



Re: Give all players items - luckie12 - 12.05.2014

Thanks! is it also possible to reset the weapons i gave them, but not the ones they bought themself...

Код:
public HuntCount(playerid)
{
	SendClientMessageToAll(COLOR_WHITE, "DM is off!");
	GameTextForAll("DM is off!", 1, 0);
    KillTimer(Hunttimer[playerid]);
	for(new i; i != MAX_PLAYERS; i++)
		{
		ResetPlayerWeapons(i);
		}
}