01.08.2014, 22:20
Hello everyone.
I've tried to create some kind of anti cheat for players, who teleports into the vehicle.
As I understand, PLAYER_STATE_ENTER_VEHICLE_DRIVER means, that player pushed "F" button.
So, if he didn't push it, but he became a driver - he is a cheater.
But right now everyone get kicked, who're trying to get into the vehicle.
Sorry for my English guys, please, help me find a solution.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate != PLAYER_STATE_ENTER_VEHICLE_DRIVER && newstate == PLAYER_STATE_DRIVER)
{
NewKick(playerid);
return true;
}
}
As I understand, PLAYER_STATE_ENTER_VEHICLE_DRIVER means, that player pushed "F" button.
So, if he didn't push it, but he became a driver - he is a cheater.
But right now everyone get kicked, who're trying to get into the vehicle.
Sorry for my English guys, please, help me find a solution.