SA-MP Forums Archive
FULL GUN - 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: FULL GUN (/showthread.php?tid=434767)



FULL GUN - Simm - 04.05.2013

how to make a command that allows to get some guns. I made a command like this
public OnPlayerCommandText(playerid, cmdtext[])
Код:
{
	if (strcmp("/fullgun", cmdtext, true, 10) == 0)
	{
		GivePlayerWeapon(playerid, 1, 20);
		GivePlayerWeapon(playerid, 2, 20);
		GivePlayerWeapon(playerid, 3, 20);
		GivePlayerWeapon(playerid, 4, 20);
		GivePlayerWeapon(playerid, 5, 20);
       	return 1;
	}
	return 0;
}
But I only get weapon 1 and 5. HELP


Re: FULL GUN - Yashas - 04.05.2013

Your Weapon IDs are not correct.They exists but you are trying to give a HAND which the player already has.
Change your weapon IDs from this page - https://sampwiki.blast.hk/wiki/Weapons

Your code has to work, nothing wrong in your code.

NOTE:Only 5 comes because 2,3,4,5 belong to one slot.A player can have maximum of 12 slots.1 Weapon from each slot.If you give a HAND then Brass Knuc. the hand is removed.If you give HAND to the player the Brass Kunc. is removed.Same for Bazukua or Mini-Gun or HS Launcher.Player can have any one of these not all!If you had played Single Player SanAndreas, you must be knowing TAB??To change weapon??The same is here.