28.07.2015, 18:18
How can i detect rapid shots,i want to make my own anti cheat and i dont have any idea how to detect that the bullet was shot x seconds after the previous one.
You can use the OnPlayerWeaponShot callback and use gettime(), store it somewhere to keep track of shooting intervals.
For instance: lastShot[playerid] = gettime(); gettime() - lastShot[playerid] returns the amount of seconds that have passed from the moment the player fired a weapon. |