Автор Тема: Anti-AirBreak,Anti-Teleport, Anti-FlyHack  (Прочитано 858 раз)

Август 14, 2015, 13:43:41 pm
Прочитано 858 раз

Freezy_Spurt

  • *****
  • Information
  • Участник
  • Администратор
  • Сообщений: 66
  • Репутация: 2
    • Просмотр профиля
В начало мода добавляем:

new Float:TelePos[MAX_PLAYERS][6];
new WaitAirCheat[MAX_PLAYERS]; 

В OnPlayerConnect:

WaitAirCheat[playerid]=0;  OnPlayerStateChange:

WaitAirCheat[playerid]=2; 
В OnPlayerUpdate:

new Float: velocity; GetPlayerVelocity(playerid, velocity, velocity, velocity);
if(velocity < 0.0 && WaitAirCheat[playerid] == 0)
{
    WaitAirCheat[playerid]=2;
}


В секундный паблик:

AntiAirBreak(playerid); 
В конец мода:

stock AntiAirBreak(playerid)
{
    if(GetPlayerDistanceFromPoint(playerid,TelePos[playerid][3],TelePos[playerid][4],TelePos[playerid][5]) < 5) { WaitAirCheat[playerid]=2; }
    if(GetPlayerDistanceFromPoint(playerid,TelePos[playerid][0],TelePos[playerid][1],TelePos[playerid][2]) >= 15 && GetPlayerState(playerid)==1 && WaitAirCheat[playerid]==0)return Kick(playerid);
    if(GetPlayerDistanceFromPoint(playerid,TelePos[playerid][0],TelePos[playerid][1],TelePos[playerid][2]) >= 20 && VehicleSpeed(GetPlayerVehicleID(playerid)) < 3 && GetPlayerState(playerid)==2 && WaitAirCheat[playerid]==0)return Kick(playerid);
    GetPlayerPos(playerid, TelePos[playerid][0], TelePos[playerid][1], TelePos[playerid][2]);
    if(WaitAirCheat[playerid]>0) WaitAirCheat[playerid]--;
    return 1;
}
stock SetPPos(playerid,Float:x,Float:y,Float:z) return WaitAirCheat[playerid]=3,TelePos[playerid][3]=x, TelePos[playerid][4]=y,TelePos[playerid][5]=z,SetPlayerPos(playerid,x,y,z), true;
stock PutPlayerInVeh(playerid, vehicleid, seatid) return WaitAirCheat[playerid]=3,PutPlayerInVehicle(playerid, vehicleid, seatid), true;
stock SetVehicleEE(vehicleid, Float:x, Float:y, Float:z)
{
    foreach(Player,i) { if(GetPlayerVehicleID(i) == vehicleid) { WaitAirCheat[i]=3; } }
    SetVehiclePos(vehicleid,x,y,z);
    return 1;
}
stock VehicleSpeed(carid)
{
    new Float:X, Float:Y, Float:Z;
    GetVehicleVelocity(carid,X,Y,Z);
    return floatround( floatsqroot( X * X + Y * Y ) * 100.0 );

Заменяем функции:
SetPlayerPos на SetPPos
PutPlayerInVehicle на PutPlayerInVeh
SetVehiclePos на SetVehicleEE