09.03.2017, 05:36
I am going to guess that an IsPlayerInAnyVehicle check is not done before triggering a weapon hack warning.
Suppose a player is in a vehicle with AK47. You give the player an M4. This M4 will replace AK47 but GetPlayerWeaponData/GetPlayerWeapon will tell that the player has AK47.
The function starts returning correct values after the player exits the vehicle. Therefore, you need an IsPlayerInAnyVehicle check in weapon hack detection code.
This is why someone who works on an anti-cheat needs to own a server. There are countless bugs to be taken care of.
Suppose a player is in a vehicle with AK47. You give the player an M4. This M4 will replace AK47 but GetPlayerWeaponData/GetPlayerWeapon will tell that the player has AK47.
The function starts returning correct values after the player exits the vehicle. Therefore, you need an IsPlayerInAnyVehicle check in weapon hack detection code.
This is why someone who works on an anti-cheat needs to own a server. There are countless bugs to be taken care of.