[ Свежие темы · Новости · Купить Premium+ · Акции · Правила · Поиск · RSS ]
  • Страница 1 из 1
  • 1
На CarShot (Как на Samp-Rp)
Lyon
Дата: Вторник, 01.10.2013, 17:04 | Сообщение # 1
Не активен...
Сообщений: 60

Сегодня мы напишем античит на CarShot который будет нас оповещать в админ чат пожалуй начнём :
ко всем new добавляем:


Код
new fuckshoter[MAX_PLAYERS][3];


В public OnPlayerConnect(playerid); добавляем:
PHP код:


Код
fuckshoter[playerid][0]=0; fuckshoter[playerid][1]=0; fuckshoter[playerid][2]=0;



В конец мода добавляем:


Код
stock ScanPlayerDosRaket(playerid)
{
      if(IsPlayerInAnyVehicle(playerid))
      {
          if(fuckshoter[playerid][1] == 1)
          {
              fuckshoter[playerid][1] = 0;
              new Float:Velocity231[3];
              GetVehicleVelocity(fuckshoter[playerid][0], Velocity231[0], Velocity231[1], Velocity231[2]);
              if(Velocity231[0]>2 || Velocity231[1]>2 || Velocity231[2]>2 || Velocity231[0]<-2 || Velocity231[1]<-2 || Velocity231[2]<-2)
              {
                  SetVehicleHealth(fuckshoter[playerid][0], 0);
                  if(fuckshoter[playerid][2]<8) fuckshoter[playerid][2]++; else
                  {
                      fuckshoter[playerid][2] = 0;
                      new nameqepinru3[MAX_PLAYER_NAME],string[180];
                      GetPlayerName(playerid, nameqepinru3, sizeof(nameqepinru3));
                      format(string,sizeof(string),"<Warning> %s[%d]: Возможно Car Airbreak",nameqepinru3,playerid);
                      ABroadCast(0xFF0000AA,string,1);
                  }
              }
          }
          new Float:Velocity23[3];
          GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity23[0], Velocity23[1], Velocity23[2]);
          if(Velocity23[0] == 0 && Velocity23[1] == 0 && Velocity23[2] == 0)
          {
              fuckshoter[playerid][0] = GetPlayerVehicleID(playerid);
              if(fuckshoter[playerid][1] == 1) fuckshoter[playerid][1] = 2;
              if(fuckshoter[playerid][1] == 0) fuckshoter[playerid][1] = 1;
          }
          else fuckshoter[playerid][0]=0, fuckshoter[playerid][1]=0;
      }
      return true;
}


в OnPlayerUpdate(playerid); добавляем:

Код
ScanPlayerDosRaket(playerid);





Подпись
Что хочу, то и ворочу...
  • Страница 1 из 1
  • 1
Поиск: