23.10.2016, 09:46
Quote:
I'm feeling hopeless since we can't detect them. They throw the other player's car and we don't know who's using it.
|
Here is my way, tested on biggest polish servers:
Код:
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) ) { Kick(playerid); } else { pInfo[playerid][player_entering_vehicle] = -1; }