GetPlayerWeapon returns wrong weapon ID
#1

Hello,

I noticed today a bug regarding GetPlayerWeapon function. At some cases it returns a wrong weapon ID (which player has used earlier).

Basically if player enters a vehicle with a weapon, and is later given a weapon using GivePlayerWeapon, then GetPlayerWeapon will return the ID of the weapon player had when he entered the vehicle.

For instance:
A player enters a vehicle having a 9mm pistol (ID 22) on his hand. Now GetPlayerWeapon will return 22.
Then player is given a new weapon, let's say Combat shotgun (ID 27). The player will have Combat shotgun on his hand, but GetPlayerWeapon will return the ID of the weapon player had on his hand when entering the vehicle (so ID 22)

I tested this few times on my local server (SA-MP 0.3e) and the same bug was repeated.
Reply
#2

https://sampforum.blast.hk/showthread.php?pid=1715214#pid1715214
This issue hasn't been fixed so far in 0.3e
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)