ну вот, решил написать небольшую функцию, которая очень хорошо видит когда в тачку просто садятся, а когда отбирают читом
в начало:
Code
new Float:StoredPos[MAX_PLAYERS][3];
new FormatMe[256];
new NameString[MAX_PLAYERS][24];
в OnPlayerUpdate
Code
if(!IsPlayerInAnyVehicle(playerid))
{
GetPlayerPos(playerid,StoredPos[playerid][0],StoredPos[playerid][1],StoredPos[playerid][2]);
}
и в OnPlayerStateChange
Code
if((oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_DRIVER) || (oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_PASSENGER))
{
GetPlayerName(playerid,NameString[playerid],24);
format(FormatMe,256,"[Античит]: %s [ID:%d] был забанен за CarJack",NameString[playerid],playerid);
SendClientMessageToAll(0xFF0000AA,FormatMe);
return BanEx(playerid,FormatMe);
}
if((oldstate != PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_PASSENGER) && (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER))
{
new Float:vPos[3], Float:Proverka;
GetVehiclePos(GetPlayerVehicleID(playerid),vPos[0],vPos[1],vPos[2]);
Proverka = floatsqroot(((vPos[0] - StoredPos[playerid][0])*(vPos[0] - StoredPos[playerid][0]))+((vPos[1] - StoredPos[playerid][1])*(vPos[1] - StoredPos[playerid][1]))+((vPos[2] - StoredPos[playerid][2])*(vPos[2] - StoredPos[playerid][2])));
if(Proverka > 7.5)
{
GetPlayerName(playerid,NameString[playerid],24);
format(FormatMe,256,"[Античит]: %s [ID:%d] был забанен за CarJack",NameString[playerid],playerid);
SendClientMessageToAll(0xFF0000AA,FormatMe);
return BanEx(playerid,FormatMe);
}
}
by BJIADOKC