To create a plugin that bans a player for abnormal rotation, you can use the Oxide API and add a hook for the OnPlayerTick
event to get the player's current rotation every frame.
Then, you can compare the player's current rotation to their previous rotation (which you can store in a dictionary or an array) and check if the change in rotation is too rapid or too large.
Here is an example implementation of this idea:
index.tsx1806 chars44 lines
This plugin will store each player's previous rotation every frame and ban them if their rotation changes too much. You can modify the MAX_ROTATION_CHANGE
constant to adjust the maximum allowed rotation change.
Don't forget to add your plugin to your Rust server's oxide/plugins
directory and add a reference to it in your oxide/config/plugins.json
file.
gistlibby LogSnag