01.11.2016, 14:57
(
Last edited by Jelly23; 14/11/2016 at 08:06 PM.
)
Troll Detection
Some troll modifications simply can't be detected through OnPlayerStateChange, because the state remains the same except for the vehicle id.
Troll mods work this way:
On-Foot:
If the cheater is on foot, it puts them in the victim's passenger seat and then in the driver seat, since you are already in the vehicle, the driver won't be ejected, this way the mod teleports the vehicle somewhere or either does something else such as setting the speed to abusive values, and then it takes the cheater out of the vehicle, the server believes the cheater was the original driver, and due to that it's position will be updated.
There's also warpers, some of them will keep your state as ''Driver'', but your vehicle id will change. So it's simple, we compare the current vehicle id with the previous vehicle entered.
In any vehicle (except the victim's):
It works the same way, but your character won't be put in the passenger seat of the victim, instead it will instantly get into the driver seat, and since the cheater is already in a vehicle, the driver won't be ejected, and the same thing will happen once the cheater is taken out of the vehicle, it's position, speed or whatever was messed with will be updated.
About this include:
I made this include long ago and i used it in my server for a long time, even tho it's simple, it's extremely accurate, no modification used to troll vehicles will work in your server with this one, i can guarante it. This include will also detect troll mods which change your state, even if there's nothing under OnPlayerStateChange for that, it still gets caught by it when both vehicle ids are compared.
Callbacks:
PHP Code:
forward OnPlayerTroll(playerid);
Pastebin
Solidfiles