25.11.2012, 21:28
To detect jetpack hacking you can hook SetPlayerSpecialAction and set a variable to true when the special action is a jetpack. Then you can hook OnPlayerSpawn, ClearAnimations, and SetPlayerSpecialAction (for SPECIAL_ACTION_NONE) to set the variable to false.
You should also hook OnPlayerKeyStateChange to detect if the car enter key is pressed and the player isn't moving (0 velocity) and set the variable to false at that time.
Then under OnPlayerUpdate check if GetPlayerSpecialAction equals SPECIAL_ACTION_USEJETPACK and if the variable is false, ban the player.
That's how you make a simple jetpack anticheat in an include.
You should also hook OnPlayerKeyStateChange to detect if the car enter key is pressed and the player isn't moving (0 velocity) and set the variable to false at that time.
Then under OnPlayerUpdate check if GetPlayerSpecialAction equals SPECIAL_ACTION_USEJETPACK and if the variable is false, ban the player.
That's how you make a simple jetpack anticheat in an include.