24.02.2018, 13:20
hey, i make this to check if is airbreaking but when is on top of the vehicle and it's going fast it will detect it as airbreak
Код:
public OnPlayerUpdate(playerid)
{
new time = gettime();
if(lastUserCheck[playerid] < time)
{
new string[129];
lastUserCheck[playerid] = time;
//Anti AirBreak
if(gettime() > AntiABImmunity[playerid])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(!IsPlayerInRangeOfPoint(playerid, 20, PosX[playerid], PosY[playerid], PosZ[playerid]))
{
if(pInfo[playerid][pAdmin] == 0)
{
if(isfalling[playerid] == 0)
{
format(string, sizeof(string), "("dr"Cheats Log "w") %s(%d) is suspected of using AirBreak", pInfo[playerid][pName], playerid);
ABroadCast(COLOR_WHITE, string, 1);
Reported[playerid] = 1;
format(Reportedfor[playerid], sizeof(string), "cheats");
format(Reportedtext[playerid], sizeof(string), "%s [%d] - level %d - was reported for AirBreak by AdmBot.", pInfo[playerid][pName], playerid, pInfo[playerid][pLevel]);
}
}
}
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(!IsPlayerInRangeOfPoint(playerid, 80, PosX[playerid], PosY[playerid], PosZ[playerid]))
{
if(pInfo[playerid][pAdmin] == 0)
{
if(isfalling[playerid] == 0)
{
format(string, sizeof(string), "("dr"Cheats Log "w") %s(%d) is suspected of using AirBreak", pInfo[playerid][pName], playerid);
ABroadCast(COLOR_WHITE, string, 1);
Reported[playerid] = 1;
format(Reportedfor[playerid], sizeof(string), "cheats");
format(Reportedtext[playerid], sizeof(string), "%s [%d] - level %d - was reported for AirBreak by AdmBot.", pInfo[playerid][pName], playerid, pInfo[playerid][pLevel]);
}
}
}
}
}
}
}

