Giving Player only a Weapon (No Ammo)
#2

Short Answer: No.

Reasoning: There are three functions related to weapons, SetPlayerArmedWeapon, GivePlayerWeapon and GetPlayerWeapon. The function you would want, GivePlayerWeapon, takes three arguments: playerid, weaponid, and ammo. The ammo parameter is not optional. You can, however, set it to a very small amount like one bullet as such:

Код:
GivePlayerWeapon(playerid, 29, 1);
N.B: Of course, you can give a melee weapon without ammo. The ammo parameter must be supplied with a number > 0, but it's not actually going to affect "how much" of the melee weapon the player will have. If you try to give the player a weapon with the ammo parameter at 0, the weapon will very quickly appear in the player's inventory and then disappear.
Reply


Messages In This Thread
Giving Player only a Weapon (No Ammo) - by eikzdej - 30.03.2016, 06:10
Re: Giving Player only a Weapon (No Ammo) - by DiverseCardinal - 30.03.2016, 06:25
Re: Giving Player only a Weapon (No Ammo) - by -CaRRoT - 30.03.2016, 06:31
Re: Giving Player only a Weapon (No Ammo) - by itsCody - 30.03.2016, 06:32
Re: Giving Player only a Weapon (No Ammo) - by DiverseCardinal - 30.03.2016, 06:37
Re: Giving Player only a Weapon (No Ammo) - by eikzdej - 30.03.2016, 06:46
Re: Giving Player only a Weapon (No Ammo) - by -CaRRoT - 30.03.2016, 06:50
Re: Giving Player only a Weapon (No Ammo) - by DiverseCardinal - 30.03.2016, 06:51

Forum Jump:


Users browsing this thread: 1 Guest(s)