GetPlayerWeaponData returns nonsense
#1

Hi. Sometimes, during the tests of my AntiCheat script, script detect weapon cheat (adding weapons). Once per minute script checks player weapons by GetPlayerWeaponData, stores to PVars and checks cheat. I print weapon in PVar and weapon returned by GetPlayerWeaponData and in PVar is 0, but GPWData returns a weaponid. But the problem is, that I have no weapon and GPWData returns ID. It happens sometimes, I don't know why. Does anybody know why? Thanks.
--------------------
Sorry for my english.
Reply
#2

GetPlayerWeapon() used OnPlayerConnect and unspawned will 'POSSIBLY' return nonsense.
Similar to GetPlayerWeaponData(), but that also 'POSSIBLY' returns nonsense if the player is in a vehicle.

Would be nice if they worked everytime, but they don't. Just make sure player is spawned and onfoot before comparing with your PVars.
Reply
#3

Thanks, I'll try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)