01.01.2018, 15:21
Here you are, my method is working for almost every car troll hack:
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { pInfo[playerid][player_entering_vehicle] = vehicleid; return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if( (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) && (oldstate != PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_PASSENGER) ) { if( pInfo[playerid][player_entering_vehicle] != GetPlayerVehicleID(playerid) ) { //Punish cheater } else { pInfo[playerid][player_entering_vehicle] = -1; } } return 1; }