SA-MP Forums Archive
Issue with GivePlayerWeapon - 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: Issue with GivePlayerWeapon (/showthread.php?tid=340468)



Issue with GivePlayerWeapon - MP2 - 07.05.2012

This may be an old issue, but if I give a player a Tec 9 with 200 ammo then give them a Mac 10/Micro SMG/Micro Uzi with 200 ammo, they have 400 ammo. The ammo in that slot isn't reset. Can this please be fixed?


EDIT: Using SetPlayerAmmo after GivePlayerWeapon fixes this, would still appreciate a fix though!


Re: Issue with GivePlayerWeapon - Basssiiie - 07.05.2012

There's no fix needed because the Tec9 en Micro Uzi use the same ammo. If you go into singleplayer and pickup a Tec9 and then pickup a Micro Uzi, you'll see the ammo will be added and not reset. It's part of the game.


Re: Issue with GivePlayerWeapon - 2KY - 07.05.2012

You could create a macro that resets the ammo in that slot and then gives them the weapon. Rather than spend time on fixing this easily fixable 'bug', and not fixing all the other plethora of glitches.


Re: Issue with GivePlayerWeapon - IceCube! - 07.05.2012

I dont really want this fixed. This would mean going into my GM and creating a stock with hooks so it still adds the ammo, others may feel the same way about it as it is now why cant you create a stock with hooks and that will save you changing everything in your GM and should solve your problem. Its not like you have to add the fix to every command you use it on.


Re: Issue with GivePlayerWeapon - MP2 - 07.05.2012

I'm no gun expert, but I don't think the MP5 uses the same ammo as a Tec9/Uzi..?

And yeah it's easily 'fixable' via a macro/hook so nevermind!


AW: Issue with GivePlayerWeapon - FufLa - 07.05.2012

Every weapon of every slot uses the same ammo. You can have a 9mm on you and a Deagle will get its ammo added ontop. Same goes to assault rifles (not sure about other slots such as throwable projectiles or rocket launchers and so on).

Already wrote a fix for it in my GM as it is easily fixable.