30.03.2016, 06:25
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:
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.
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);