[Help] Anti-sobe** for 0.3.7 samp +rep
#6

Quote:
Originally Posted by Irish
Посмотреть сообщение
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.
Anty cheat for car hacks is easy, I don't know why nobody on community trying to do it this way.

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;  
                }
Done. Remember to set pInfo[playerid][player_entering_vehicle] to -1 in onplayerlogin/connect.
Reply


Messages In This Thread
[Help] Anti-sobe** for 0.3.7 samp +rep - by Irish - 23.10.2016, 04:48
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Threshold - 23.10.2016, 06:24
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by SickAttack - 23.10.2016, 06:31
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Micko123 - 23.10.2016, 07:17
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Irish - 23.10.2016, 09:29
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Rdx - 23.10.2016, 09:46
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Irish - 23.10.2016, 09:52
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by Rdx - 23.10.2016, 10:00
Re: [Help] Anti-sobe** for 0.3.7 samp +rep - by SickAttack - 23.10.2016, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)