• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [HELP] Fully eliminating weapon when no ammo left
#1
Hey.



So, since a while ago i was having an issue when finishing using a weapon (when i shot the last bullet left). As we all know, when we're using GetPlayerWeaponData, old weapons with no ammo left are still returned and basically that fucks everything up if you're checking if a player already has that specific weapon by using the GetPlayerWeaponData function.



So my question is: Is there any way we can like reset or eliminate that weapon when whe shot the last bullet for the last time? As i said, the weapon vanishes, but it still shows up on GetPlayerWeaponData.



I already tried to remove it when shooting and checking if it was the last bullet using OnPlayerWeaponShot, but i had no success on it.



Please, help!? 䑃 to those who?can give me a good answer.



Thank yall.
  Reply
#2
And why can't you keep track of the weapons the player has with GivePlayerWeapon (㩳➫姦ꦢ璡) ?
  Reply
#3
https://github.com/BrunoBM16/samp-packet...e---id-204

Use pawn raknet and IPacket 204


EDIT: Why are y'all paining yourselves, just use fixes bro
https://github.com/pawn-lang/sa-mp-fixes
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#4
Thank you, @Pinch.



That should work. REP as promised.
  Reply


Forum Jump: