SA-MP Forums Archive
Keep Weapons When Ammo Reaches 0. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Keep Weapons When Ammo Reaches 0. (/showthread.php?tid=270321)



Keep Weapons When Ammo Reaches 0. - cloudysky - 19.07.2011

Is there is any way i can prevent a weapon from leaving the player when it runs out of ammo??


Re: Keep Weapons When Ammo Reaches 0. - sleepysnowflake - 19.07.2011

Get his weapon, store it somewhere and when he refills ammo, give it back to him ?


Re: Keep Weapons When Ammo Reaches 0. - [HiC]TheKiller - 19.07.2011

Unless you give the player ammo, the game auto changes the weapon to the next one.


Re: Keep Weapons When Ammo Reaches 0. - Steven82 - 19.07.2011

Couldn't you save the weapon to a file, and once the ammo runs out. Wait until the player buys more ammo(make that feature) and when he buys the ammo detect if he has that weapon in a file, and if he does use the GivePlayerWeapon function.


Re: Keep Weapons When Ammo Reaches 0. - Backwardsman97 - 19.07.2011

It's GTA:SA's code that gets rid of your weapon once the ammo depleted.