Форум

  • Страница 1 из 1
  • 1
Модератор форума: dr40  
Форум | www.SAMP-TEAM.com » Wiki SA-MP » Вопросы по скриптингу » Проблема с античитом [Anti Airbreak] (Проблема с античитом [Anti Airbreak])
Проблема с античитом [Anti Airbreak]
Дело вот вчем:

Когда я захожу вздание меня кикает с причиной что я использую Airbreak

Заранее спасибо тому кто поможет решить данную проблему!

Это код всего античита:

Код
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#define RED 0xFF0000FF

new Float:xo[MAX_PLAYERS],Float:yo[MAX_PLAYERS],Float:zo[MAX_PLAYERS];
new timerantiairbreak[MAX_PLAYERS];
forward antibreak(playerid);
forward KickTimer(playerid);

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  print("\n-------------------------------------");
  print("|      Anti Air Break Loaded          |");
  print("-------------------------------------\n");
  return 1;
}

public OnFilterScriptExit()
{
  return 1;
}

#else

main()
{
  print("\n-------------------------------------");
  print("|       Anti Air Break Loaded         |");
  print("-------------------------------------\n");
}

public OnGameModeInit()
{
  // Don't use these lines if it's a filterscript
  SetGameModeText("Blank Script");
  AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
  SetPVarInt(playerid, "NoAB", 1);
}

public OnGameModeExit()
{
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  return 1;
}

#endif

public OnPlayerDisconnect(playerid, reason)
{
     if(GetPVarInt(playerid, "Kick") != 0) KillTimer(GetPVarInt(playerid, "Kick"));
     KillTimer(timerantiairbreak[playerid]);
  return 1;
}

public OnPlayerUpdate(playerid)
{
  if(GetPVarInt(playerid, "Kick") != 0) GKick(playerid);
}

public OnPlayerSpawn(playerid)
{
     timerantiairbreak[playerid] = SetTimerEx("antibreak", 300, true, "i", playerid);
  return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
  KillTimer(timerantiairbreak[playerid]);
  return 1;
}

stock IsPlayerInAirPlane(vehicleid)
{
   switch(GetVehicleModel(vehicleid))
   {
     case
         460,464,476,511,512,513,519,520,553,577,592,593,
         417,425,447,465,469,487,488,497,501,548,563:
     return true;
   }
   return false;
}

stock Float:GetPlayerMoveCount(Float:oldd,Float:neww)
{
  new Float:ret;
  if(oldd < neww)
  {
   ret = neww - oldd;
  }
  else if(neww > oldd)
  {
      ret = oldd - neww;
  }
  else if(neww == oldd)
  {
      ret = 0;
  }
  return ret;
}

public antibreak(playerid)
{
  new Float:xt,Float:yt,Float:zt;
  GetPlayerPos(playerid,xt,yt,zt);
  if(!IsPlayerAdmin(playerid))
     if(!IsPlayerInAirPlane(playerid))
     {
         if(xo[playerid] != 0.0 || yo[playerid] != 0.0 || zo[playerid] != 0.0)
         {
             new Float:xs,Float:ys,Float:zs;
             xs = GetPlayerMoveCount(xo[playerid],xt);
             ys = GetPlayerMoveCount(yo[playerid],yt);
             zs = GetPlayerMoveCount(zo[playerid],zt);
             if(xs >= 16.5 || ys >= 16.5 || zs >= 16.5)
             {
                 if(xs <= 50.0)
                 {
                  SendClientMessage(playerid,RED,"[Àíòè÷èò] Âû áûëè êèêíóòû ïî ïîäîçðåíèþ â ÷èòåðñòâå!!!");
                  new name[100];
                  GetPlayerName(playerid,name,sizeof(name));
                  new out[100];
                  format(out,sizeof(out),"[Àíòè÷èò] Èãðîê %s áûë êèêíóò çà èñïîëüçîâàíèå ÷èòîâ [AirBreak]!!!",name);
                  SendClientMessageToAll(RED,out);
                  GKick(playerid);
     }
             }
         }
     }
     GetPlayerPos(playerid,xo[playerid],yo[playerid],zo[playerid]);
  return 1;
}

public KickTimer(playerid) return GKick(playerid);

stock GKick(playerid, time = 5000)
{
      if(GetPVarInt(playerid, "Kick") == -1) Kick(playerid);
      else if(!GetPVarInt(playerid, "Kick")) SetPVarInt(playerid, "Kick", SetTimerEx("KickTimer", time, 0, "d", playerid));
      else
      {
          KillTimer(GetPVarInt(playerid, "Kick"));
          SetPVarInt(playerid, "Kick", -1);
          GKick(playerid);
      }
      return 1;
}
04.08.2013 в 20:08
Кривоватый anti airbreak или лаги на сервере и он не успевает сроватывать
04.08.2013 в 22:57
Форум | www.SAMP-TEAM.com » Wiki SA-MP » Вопросы по скриптингу » Проблема с античитом [Anti Airbreak] (Проблема с античитом [Anti Airbreak])
  • Страница 1 из 1
  • 1
Поиск: