Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-12-17, 11:46


critical99







Wiek: 26
Na forum: 5264 dni
Posty: 85

Piwa: 285

Respekt: 115,3
Respekt: 115,3

Witam. Z dniem dzisiejszym upubliczniam niedoko?czon? wersj? drug? serwera Polski Impreza Serwer (Impreza DM), kt?ra nigdy nie ujrza?a ?wiat?a dziennego.

Autorzy: Dyzieg, critical, NitroFuN

Jako, i? jest to wersja niedoko?czona, zawiera bugi i ma pe?no niedor?bek.

Mapa zosta?a udost?pniona bez obiekt?w, wi?c obiekty do niekt?rych zabaw nale?y wykona? samemu.

Co zawiera gamemode:


- System ekwipunku pod MySQL,
- System pokemon?w ala ibiza (sta?e koordynaty, mo?na wykorzysta? ColAndreas),
- System klan?w (niedoko?czony, w wersji v2 dodano tereny do przejmowania w LS oraz odznaczenia klanowe),
- Skiny na bronie (kolorowanie broni),
- Podstawowy, prowizoryczny Anti-Cheat,
- Anty-Proxy (prawdopodobnie nieaktualne),
- System zabezpieczaj?cy przed logowaniem z kilku IP w szybkim tempie,
- System raport?w do MySQL,
- System supportu (wysy?anie, zamykanie, odpowiadanie na tematy) pod MySQL,
- Wyszukiwanie i sprawdzanie statystyk graczy offline (/players),
- System dom?w (Wykorzystany z forum SA-MPa, zamieniony pod obs?ug? obecnego pluginu MySQL),
- System automatycznych zabaw (Niedoko?czony, niekt?re zabawy wymagaj? obiekt?w, kt?re zosta?y wyci?te),
- System prywatnych pojazd?w z ulepszeniami silnika (nowo?? w v2), kt?re zostaj? na mapie po wyj?ciu gracza z serwera,
- System serwerowych event?w (v2),
- System Reflex (v2, bug z textdrawem),
- System cheat?w dla gracza (/cheats),
- System event?w (standardowe, TDM, OX; Mapa dla OX zosta?a prawdopodobnie wyci?ta),
- Wst?pna integracja z Discordem,
- Mo?liwo?? po??czenia konta z Google Authenticator i Discord (to drugie do dopracowania),
- System prac (by?o ich kilka),
- Dynamiczne tworzenie cz??ci samochodowych, strza?ek teleportacyjnych, ItemPark?w, pojazd?w na mapie oraz tras spedycyjnych,
- Wiele wi?cej funkcji, kt?rych nie pami?tam.

Gamemode na ten moment nie nadaje si? do tworzenia publicznego serwera, lecz mo?na wykorzysta? kilka system?w lub (je?li kto? jest ch?tny i ma du?o czasu) mo?na go poprawi?.

Tabele w bazie danych tworz? si? automatycznie, z wyj?tkiem tabeli players oraz tabel zwi?zanymi z domami. Uda?o mi si? stworzy? prawdopodobnie kompletn? struktur?, kt?r? umie?ci?em w plikach.


Ostrzegam o du?ej ilo?ci timer?w i ba?aganie w kodzie. XD




Pliki serwera s? zaktualizowane pod wersje SA-MP 0.3.8 RC4-1+.

Serwer wymaga po??czenia z botem na serwerze g?osowym Discord.
Wi?cej informacji: http://gtao.pl.com/showthread.php?t=631562
W server.cfg:
Pawn
discord_bot_token TW?J_TOKEN


Dane do MySQL:
Pawn
// MySQL config
#define        MYSQL_HOST             "ip"
#define        MYSQL_USER             "user"
#define     MYSQL_PASSWORD         "password"
#define        MYSQL_DATABASE         "nazwa_bazy"


Gamemode udost?pniony jest na licencji MIT:
Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.


Ostatnio zmieniony przez critical99 2018-06-05, 23:40, w całości zmieniany 4 razy  
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 122 piw(a):
Bonn333, Virex_PL, robokop500, DsJ3, Buczer, CareR, null, kamil3642, ZohanSon, Ziomx, Liskey., Nothick, bedno, dando12, xmariusx, mateusz195, ring, Technomen, Andrzej30121, sfd, String256, loordwiader, ziBBo, muzyn, DerZikk, Shlasku, ziomek9781, jarosek12, Grace, Uriziel, lxrd16, damian120192, JestemSuperLIKE, Ciastuuś, TheEclipse, datguygetr, Marek211, Recreate, kacper23, busti, ErroR1922, Dezert, PieselAlkoholik, Squick, PlayRoom, Haapus, linc, Lopata32s, luj vuitton, xaimonek, EasyZielak, kacper121248, czikenpl, kacperg300, Rival., RimeQ, Patty, mrv94, MacieXlysy, driv3r), Lion3, NexuseQ, DarylDixon, Borysovsky, DeathXP, Deathx2, rival94, Zzax12, MikoPlayGames1, Steez, 0x73756e7368696, sunshine, Shevil123, smajlonek1, decxde_, Hussar, l4vir, pseudolconfirme, WujekEddy, SOURCE12, klimber013, Obsraniec2137, schizein, Hunter2019, H4K3R, xKrokodylek, Xnginecode, DarkMurderYT, drkd3viL, WeaponSAMP, skylinee, Szydlo, kornelek98, Yibica6370, klima456, Picketina, kazuki977, bistubigna, kornelkornel09, Maks xds, MaciusMP, AntiPL, horod47957, Bluebyte, Acer199, Komin, dirtyjack, rxkrxd, mrv1337, Simkowy_321, aimsoft, Omar2001, vks, Real, Jellonek, rvndale, realborixon, pixiebyt3, Micewop841, Pehix88200, brokikrul, Patcreo
Wysłany: 2017-12-17, 12:28


Virex_PL

Głos rozsądku






Wiek: 26
Na forum: 4187 dni
Posty: 170
Nick w MP: Virex_PL

Piwa: 31

Respekt: 120
Respekt: 120

Kod sam w sobie stylem pisania podobny do uG. Mi osobi?cie ci??ko si? po?apa? co gdzie i jak :D No ale propsy za ch?ci pisania czegokolwiek nowego do tej gry :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-17, 12:35


critical99







Wiek: 26
Na forum: 5264 dni
Posty: 85

Piwa: 285

Respekt: 115,3
Respekt: 115,3

Virex_PL, ten GM ma ju? z p?? roku. PAWNa nauczy?em si? g??wnie na ug, wi?c kod jest podobny, tego nie ukrywam.

Uda?o mi si? stworzy? prawdopodobnie kompletn? struktur? do bazy danych, lecz nie jestem pewien, czy jest prawid?owa. Konta si? tworz?.

Edit:


Aktualizacja kodu

- Poprawki w strukturze bazy danych,
- Optymalizacja zapisu kont (lagowa?o serwer przy zapisie)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-20, 22:36


Lavazavi







Wiek: 22
Na forum: 3149 dni
Posty: 18
Nick w MP: TAJEMNICA

Piwa: 61

Respekt: 25,3

Ostrzeżeń: 100%
Widac ze nie skonczony ale podstawy ma :D Ogolnie boli mnie brak teleportow ;/

Podpis
jIbiza
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-20, 22:54


critical99







Wiek: 26
Na forum: 5264 dni
Posty: 85

Piwa: 285

Respekt: 115,3
Respekt: 115,3

Lavazavi, w v2 mia?o ich nie by?, wi?c zosta?y zachowane jedynie podstawowe.
Nie problem je dorobi?, jest to w kodzie pokazane.

Pawn
CMD:praca(playeridparams[]) return TPPlayer(playerid0,2431.1289,-1669.9307,13.5562);


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-24, 06:33


loordwiader







Wiek: 30
Na forum: 3085 dni
Posty: 2
Nick w MP: polandoemigrante



Respekt: 50

jak to wgrac?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-24, 08:44


critical99







Wiek: 26
Na forum: 5264 dni
Posty: 85

Piwa: 285

Respekt: 115,3
Respekt: 115,3

loordwiader, je?eli chcesz mie? integracj? z Discordem, Tw?j hosting lub VPS musi posiada? bibliotek? libssl w wersji 32-bitowej. Mo?na w bardzo ?atwy spos?b wyci?? t? integracj?, gdy? by?a wtedy na s?abym stadium rozwoju.

Je?eli masz t? bibliotek? wystarczy, ?e przekopiujesz plik z gamemodes .amx do gamemodes na hostingu, przekopiujesz pluginy (s? na Windowsa i na Linuxa), ustawisz odpowiednio config, po??czysz z baz? danych i discordem i dzia?a.

Wszystkie podstawowe wskaz?wki umie?ci?em w temacie.

Je?eli masz problemy, daj logi. Postaram si? pom?c.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-28, 17:27


jarosek12







Wiek: 26
Na forum: 4449 dni
Posty: 41

Piwa: 191

Respekt: 63

Ostrzeżeń: 100%
Ma kto? mo?e include "Impreza\aim.inc" ?? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-28, 17:32


NitroFuN

El Barto






Wiek: 25
Na forum: 4127 dni
Posty: 532

Piwa: 1195

Respekt: 650,5
Respekt: 650,5Respekt: 650,5

jarosek12, wszystko jest na githubie projektu :)

Ale ?ap
Pawn
#if defined _INCLUDE_BUSTAIM_
    #endinput
#endif
#define _INCLUDE_BUSTAIM_
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define BustAim:: BS_

#if !defined BUSTAIM_MAX_PL_PERCENTAGE
    #define BUSTAIM_MAX_PL_PERCENTAGE 5
#endif
#if !defined BUSTAIM_MAX_PING
    #define BUSTAIM_MAX_PING 600
#endif
#if !defined BUSTAIM_SKIP_WEAPON_IDS
    #define BUSTAIM_SKIP_WEAPON_IDS 38
#endif
#if !defined BUSTAIM_MAX_CONTINOUS_SHOTS
    #define BUSTAIM_MAX_CONTINOUS_SHOTS 10
#endif
#if !defined BUSTAIM_PROAIM_TELEPORT_PROBES
    #define BUSTAIM_PROAIM_TELEPORT_PROBES 3
#endif
#if !defined BUSTAIM_OUT_OF_RANGE_PROBES
    #define BUSTAIM_OUT_OF_RANGE_PROBES 2
#endif
#if !defined BUSTAIM_RANDOM_AIM_PROBES
    #define BUSTAIM_RANDOM_AIM_PROBES 5
#endif
#if !defined MIN_DIST_FOR_AIM_CHECKS
    #define MIN_DIST_FOR_AIM_CHECKS 10
#endif
#if !defined MAX_B2V_DEVIATION
    #define MAX_B2V_DEVIATION 15
#endif
#if !defined BUSTAIM_PLAYER_SPHERE_RADIUS
    #define BUSTAIM_PLAYER_SPHERE_RADIUS 3
#endif
#if !defined BUSTAIM_DEFAULT_PLAYER_FLAGS
    #define BUSTAIM_DEFAULT_PLAYER_FLAGS (CHECK_FOR_OUT_OF_RANGE_SHOTS    |    CHECK_FOR_PROAIM_TELEPORT   |    CHECK_FOR_RANDOM_AIM_SHOTS    |     CHECK_FOR_CONTINOUS_SHOTS)
#endif
#if !defined BUSTAIM_WSTATS_SHOTS
    #define BUSTAIM_WSTATS_SHOTS 3
#endif

//DO NOT CHANGE THIS
#define BS_TOTAL_SHOOTING_WEAPONS 17 //includes RPG,HS,FT
#if BS_TOTAL_SHOOTING_WEAPONS != 17
    #error BS_TOTAL_SHOOTING_WEAPONS should always be set to 17
#endif

#define BS_GetNormalWeaponRange(weaponid) BustAim_g_WeaponRangeOriginal[weaponid-22]
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
forward OnPlayerSuspectedForAimbot(playerid,hitid,weaponid,warnings);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
enum (<<=1)
{
    WARNING_OUT_OF_RANGE_SHOT=1,
    WARNING_PROAIM_TELEPORT,
    WARNING_RANDOM_AIM,
    WARNING_CONTINOUS_SHOTS
}
enum (<<=1)
{
    PREVIOUS_SHOT_DID_DAMAGE=1,
}
enum (<<=1)
{
    CHECK_FOR_OUT_OF_RANGE_SHOTS=1,
    CHECK_FOR_PROAIM_TELEPORT,
    CHECK_FOR_RANDOM_AIM_SHOTS,
    CHECK_FOR_CONTINOUS_SHOTS,
    IGNORE_PLAYER
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Modified Slice's Max Weapon Ranges from Weapon Config Include (Added 10 units extra for every weapon to make allowance for lagging players)
static const Float:BustAim_g_WeaponRange[] =
{
    45.0// 22 - Colt 45
    45.0// 23 - Silenced
    45.0// 24 - Deagle
    50.0// 25 - Shotgun
    45.0// 26 - Sawed-off
    50.0// 27 - Spas
    45.0// 28 - UZI
    55.0// 29 - MP5
    100.0// 30 - AK47
    120.0// 31 - M4
    45.0// 32 - Tec9
    110.0// 33 - Cuntgun
    320.0// 34 - Sniper
    0.0// 35 - Rocket launcher
    0.0// 36 - Heatseeker
    0.0// 37 - Flamethrower
    85.0  // 38 - Minigun
};
//Original Slice's Max Weapon Ranges'
stock const Float:BustAim_g_WeaponRangeOriginal[] =
{
    35.0// 22 - Colt 45
    35.0// 23 - Silenced
    35.0// 24 - Deagle
    40.0// 25 - Shotgun
    35.0// 26 - Sawed-off
    40.0// 27 - Spas
    35.0// 28 - UZI
    45.0// 29 - MP5
    70.0// 30 - AK47
    90.0// 31 - M4
    35.0// 32 - Tec9
    100.0// 33 - Cuntgun
    320.0// 34 - Sniper
    0.0// 35 - Rocket launcher
    0.0// 36 - Heatseeker
    0.0// 37 - Flamethrower
    75.0  // 38 - Minigun
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static BustAim_g_PlayerSettings[MAX_PLAYERS char];
static BustAim_g_PlayerPrevWeapon[MAX_PLAYERS char];

static BustAim_g_IntrnlPlayerSettings[MAX_PLAYERS char];

static BustAim_g_ContinousShots[MAX_PLAYERS char];
static BustAim_g_RandomAimShots[MAX_PLAYERS char];
static BustAim_g_TeleportShots[MAX_PLAYERS char];
static BustAim_g_OutOfRangeShots[MAX_PLAYERS char];

#if !defined BUSTAIM_DISABLE_PROFILING
static BustAim_g_TotalRandomAimWarns[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
static BustAim_g_TotalTeleportWarns[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
static BustAim_g_TotalOutOfRangeWarns[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
static BustAim_g_MaxContinousShots[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
static BustAim_g_ShotsFired[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
static BustAim_g_ShotsHit[MAX_PLAYERS][BS_TOTAL_SHOOTING_WEAPONS];
#endif

#if !defined BUSTAIM_DISABLE_WSTATS
static Float:BustAim_g_TeleportWarningStats[MAX_PLAYERS][BUSTAIM_WSTATS_SHOTS];
static Float:BustAim_g_AimWarningStats[MAX_PLAYERS][BUSTAIM_WSTATS_SHOTS];
static Float:BustAim_g_RangeWarningStats[MAX_PLAYERS][BUSTAIM_WSTATS_SHOTS];
static Float:BustAim_g_DCTTL_temp;
#endif

#if !defined BUSTAIM_IS_PAUSED_FUNCTION
static BustAim_g_LastUpdateTick[MAX_PLAYERS];
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static Float:internal_BS_DCTTL(Float:CamXFloat:CamYFloat:CamZFloat:ObjXFloat:ObjYFloat:ObjZFloat:FrXFloat:FrYFloat:FrZ)
{
       static Float:TGTDistance,Float:tmpXFloat:tmpYFloat:tmpZ;
    TGTDistance floatsqroot((CamX ObjX) * (CamX ObjX) + (CamY ObjY) * (CamY ObjY) + (CamZ ObjZ) * (CamZ ObjZ));

    tmpX FrX TGTDistance CamX;
    tmpY FrY TGTDistance CamY;
    tmpZ FrZ TGTDistance CamZ;

    return floatsqroot((tmpX ObjX) * (tmpX ObjX) + (tmpY ObjY) * (tmpY ObjY) + (tmpZ ObjZ) * (tmpZ ObjZ));
}
static Float:internal_BS_GPATP(Float:x2Float:y2Float:XFloat:Y)
{
    static Float:DXFloat:DY,Float:angle;

    DX floatabs(floatsub(x2,X));
    DY floatabs(floatsub(y2,Y));

      if (DY == 0.0 || DX == 0.0)
      {
        if(DY == && DX 0angle 0.0;
        else if(DY == && DX 0angle 180.0;
        else if(DY && DX == 0angle 90.0;
        else if(DY && DX == 0angle 270.0;
        else if(DY == && DX == 0angle 0.0;
      }
      else
    {
        angle atan(DX/DY);

        if(x2 && <= y2angle += 90.0;
        else if(<= x2 && y2angle floatsub(90.0angle);
        else if(x2 && >= y2angle -= 90.0;
        else if(>= x2 && y2angle floatsub(270.0angle);
      }
      return floatadd(angle90.0);
}
static internal_BS_GXYIFOP(&Float:x, &Float:yFloat:angleFloat:distance)
{
    += (distance floatsin(-angledegrees));
    += (distance floatcos(-angledegrees));
}
static internal_BS_IsCameraAimingAt(weaponid,Float:xFloat:yFloat:z,Float:vector_x,Float:vector_y,Float:vector_z,Float:camera_x,Float:camera_y,Float:camera_z,Float:radius)
{
       static Float:verticalFloat:horizontal;
    switch (weaponid)
    {
        case 34,35,36:
        {
            if (internal_BS_DCTTL(camera_xcamera_ycamera_zxyzvector_xvector_yvector_z) < radius) return true;
            return false;
        }
        case 30,31: {vertical 4.0horizontal = -1.6;}
        case 33: {vertical 2.7horizontal = -1.0;}
        default: {vertical 6.0horizontal = -2.2;}
    }
    new Float:angle internal_BS_GPATP(00floatsqroot(vector_x*vector_x+vector_y*vector_y), vector_z) - 270.0;
    new Float:resize_xFloat:resize_yFloat:resize_z floatsin(angle+verticaldegrees);

    internal_BS_GXYIFOP(resize_xresize_yinternal_BS_GPATP(00vector_xvector_y)+horizontalfloatcos(angle+verticaldegrees));
    #if !defined BUSTAIM_DISABLE_WSTATS
        if ((BustAim_g_DCTTL_temp internal_BS_DCTTL(camera_xcamera_ycamera_zxyzresize_xresize_yresize_z)) < radius) return true;
    #else
        if (internal_BS_DCTTL(camera_xcamera_ycamera_zxyzresize_xresize_yresize_z) < radius) return true;
    #endif
    return false;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    static Float:pX,Float:pY,Float:pZ,Float:hX,Float:hY,Float:hZ,Float:cX,Float:cY,Float:cZ;
    if(!(21 weaponid 39)
       || !(-hittype 5))
        #if defined BustAim_OnPlayerWeaponShot
            return BustAim_OnPlayerWeaponShotplayeridweaponidhittypehitidfXfYfZ );
        #else
            return 0;
        #endif
        
    if(hittype == BULLET_HIT_TYPE_NONE)
    {
        if(floatabs(fX) > 20000.0 || floatabs(fY) > 20000.0 || floatabs(fZ) > 20000.0)
        {
            #if defined BustAim_OnPlayerWeaponShot
                return BustAim_OnPlayerWeaponShot(playeridweaponidhittypehitidfXfYfZ);
            #else
                return 0;
            #endif
        }
    } 
    else
    {
        if(floatabs(fX) > 1500.0 || floatabs(fY) > 1500.0 || floatabs(fZ) > 1500.0)
        {
            #if defined BustAim_OnPlayerWeaponShot
                return BustAim_OnPlayerWeaponShot(playeridweaponidhittypehitidfXfYfZ);
            #else
                return 0;
            #endif
        }
    }
    
    #if !defined BUSTAIM_DISABLE_PROFILING
    BustAim_g_ShotsFired[playerid][weaponid-22]++;
    #endif
    
    if(hittype == BULLET_HIT_TYPE_PLAYER)
    {
        #if !defined BUSTAIM_DISABLE_PROFILING
            BustAim_g_ShotsHit[playerid][weaponid-22]++;
        #endif

        if(BustAim_g_PlayerSettings{playerid} & IGNORE_PLAYER)
            #if defined BustAim_OnPlayerWeaponShot
                return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

        if(BustAim_g_PlayerPrevWeapon{playerid} != weaponid)
        {
            BustAim_g_ContinousShots{playerid} =
            BustAim_g_RandomAimShots{playerid} =
            BustAim_g_TeleportShots{playerid} =
            BustAim_g_OutOfRangeShots{playerid} = 0;

            BustAim_g_PlayerPrevWeapon{playerid} = weaponid;
        }

        if(IsPlayerNPC(hitid))
               #if defined BustAim_OnPlayerWeaponShot
                   return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

        #if defined BUSTAIM_IS_PAUSED_FUNCTION
            if(BUSTAIM_IS_PAUSED_FUNCTION(hitid))
            #if defined BustAim_OnPlayerWeaponShot
                 return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif
        #else
            if((GetTickCount() - BustAim_g_LastUpdateTick[hitid]) > 1000)
            #if defined BustAim_OnPlayerWeaponShot
                return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif
        #endif

        if(NetStats_PacketLossPercent(playerid) > BUSTAIM_MAX_PL_PERCENTAGE ||  NetStats_PacketLossPercent(hitid) > BUSTAIM_MAX_PL_PERCENTAGE)
            #if defined BustAim_OnPlayerWeaponShot
                   return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

        if(GetPlayerPing(playerid) > BUSTAIM_MAX_PING ||  GetPlayerPing(hitid) > BUSTAIM_MAX_PING)
            #if defined BustAim_OnPlayerWeaponShot
                return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

           if(IsPlayerInAnyVehicle(playerid) || IsPlayerInAnyVehicle(hitid))
            #if defined BustAim_OnPlayerWeaponShot
                   return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

        if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID || GetPlayerSurfingVehicleID(hitid) != INVALID_VEHICLE_ID)
              #if defined BustAim_OnPlayerWeaponShot
                  return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
            #else
                return 1;
            #endif

        switch(weaponid)
        {
            case BUSTAIM_SKIP_WEAPON_IDS:
            {
                #if defined BustAim_OnPlayerWeaponShot
                       return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
                #else
                    return 1;
                #endif
            }
        }
        
        new warning 0;

        GetPlayerVelocity(hitid,pX,pY,pZ);

        if(BustAim_g_PlayerSettings{playerid} & CHECK_FOR_CONTINOUS_SHOTS)
            if((pX*pX pY*pY pZ*pZ) > 0.01)
                if(!(++BustAim_g_ContinousShots{playerid} % BUSTAIM_MAX_CONTINOUS_SHOTS))
                    warning |= WARNING_CONTINOUS_SHOTS;

        GetPlayerPos(hitid,hX,hY,hZ);
        GetPlayerLastShotVectors(playerid,pX,pY,pZ,cX,cY,cZ);

        new Float:S2V_dist VectorSize(pX-hX,pY-hY,pZ-hZ); //Approximate Shooter to Victim Distance

        if(BustAim_g_PlayerSettings{playerid} & CHECK_FOR_OUT_OF_RANGE_SHOTS)
        {
            if(S2V_dist BustAim_g_WeaponRange[weaponid-22])
            {
                #if !defined BUSTAIM_DISABLE_WSTATS
                     BustAim_g_RangeWarningStats[playerid][BustAim_g_OutOfRangeShots{playerid}%BUSTAIM_WSTATS_SHOTS] = S2V_dist;
                #endif
                if(BustAim_g_IntrnlPlayerSettings{playerid} & PREVIOUS_SHOT_DID_DAMAGE)
                {
                    if(++BustAim_g_OutOfRangeShots{playerid} > BUSTAIM_OUT_OF_RANGE_PROBES)
                    {
                        BustAim_g_OutOfRangeShots{playerid} = 0;
                        #if !defined BUSTAIM_DISABLE_PROFILING
                            BustAim_g_TotalOutOfRangeWarns[playerid][weaponid-22]++;
                        #endif
                        warning |= WARNING_OUT_OF_RANGE_SHOT;
                    }
                    BustAim_g_IntrnlPlayerSettings{playerid} &= ~PREVIOUS_SHOT_DID_DAMAGE;
                }
            }
        }

        if(BustAim_g_PlayerSettings{playerid} & CHECK_FOR_PROAIM_TELEPORT)
            if(VectorSize(cX-hX,cY-hY,cZ-hZ) > MAX_B2V_DEVIATION)
            {
                #if !defined BUSTAIM_DISABLE_WSTATS
                      BustAim_g_TeleportWarningStats[playerid][BustAim_g_TeleportShots{playerid}%BUSTAIM_WSTATS_SHOTS] = VectorSize(cX-hX,cY-hY,cZ-hZ);
                #endif
                if(++BustAim_g_TeleportShots{playerid} > BUSTAIM_PROAIM_TELEPORT_PROBES)
                {
                    BustAim_g_TeleportShots{playerid} = 0;
                    #if !defined BUSTAIM_DISABLE_PROFILING
                        BustAim_g_TotalTeleportWarns[playerid][weaponid-22]++;
                    #endif
                    warning |= WARNING_PROAIM_TELEPORT;
                }
            }

        

        if(BustAim_g_PlayerSettings{playerid} & CHECK_FOR_RANDOM_AIM_SHOTS)
            if(S2V_dist MIN_DIST_FOR_AIM_CHECKS)
            {
                GetPlayerCameraFrontVector(playerid,pX,pY,pZ);
                GetPlayerCameraPos(playerid,cX,cY,cZ);
                if(!internal_BS_IsCameraAimingAt(weaponid,hX,hY,hZ,pX,pY,pZ,cX,cY,cZ,BUSTAIM_PLAYER_SPHERE_RADIUS))
                {
                    #if !defined BUSTAIM_DISABLE_WSTATS
                           BustAim_g_AimWarningStats[playerid][BustAim_g_RandomAimShots{playerid}%BUSTAIM_WSTATS_SHOTS] = BustAim_g_DCTTL_temp;
                    #endif
                    if(++BustAim_g_RandomAimShots{playerid} > BUSTAIM_RANDOM_AIM_PROBES)
                    {
                        BustAim_g_RandomAimShots{playerid} = 0;
                        #if !defined BUSTAIM_DISABLE_PROFILING
                            BustAim_g_TotalRandomAimWarns[playerid][weaponid-22]++;
                        #endif
                        warning |= WARNING_RANDOM_AIM;
                    }
                }
            }
        if(warning)
            #if defined OnPlayerSuspectedForAimbot
               if(OnPlayerSuspectedForAimbot(playerid,hitid,weaponid,warning)) BustAim_g_PlayerSettings{playerid} |= IGNORE_PLAYER;
            #endif
    }
    else
    {
        #if !defined BUSTAIM_DISABLE_PROFILING
            if(BustAim_g_ContinousShots{playerid} > BustAim_g_MaxContinousShots[playerid][weaponid-22])
                BustAim_g_MaxContinousShots[playerid][weaponid-22] = BustAim_g_ContinousShots{playerid};
         #endif
        BustAim_g_ContinousShots{playerid} =
        BustAim_g_RandomAimShots{playerid} =
        BustAim_g_TeleportShots{playerid} =
        BustAim_g_OutOfRangeShots{playerid} = 0;
    }
    #if defined BustAim_OnPlayerWeaponShot
        return BustAim_OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,fX,fY,fZ);
    #else
        return 1;
    #endif
}
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    if((<= damagedid MAX_PLAYERS) && (<= weaponid 50)) BustAim_g_IntrnlPlayerSettings{playerid} |= PREVIOUS_SHOT_DID_DAMAGE;
    #if defined BustAim_OnPlayerGiveDamage
        return BustAim_OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart);
    #else
        return 1;
    #endif
}
#if defined _ALS_OnPlayerWeaponShot
#undef OnPlayerWeaponShot
#else
#define _ALS_OnPlayerWeaponShot
#endif

#define OnPlayerWeaponShot BustAim_OnPlayerWeaponShot

#if defined BustAim_OnPlayerWeaponShot
    forward BustAim_OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ);
#endif

#if defined _ALS_OnPlayerGiveDamage
#undef OnPlayerGiveDamage
#else
#define _ALS_OnPlayerGiveDamage
#endif

#define OnPlayerGiveDamage BustAim_OnPlayerGiveDamage

#if defined BustAim_OnPlayerGiveDamage
    forward BustAim_OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart);
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#if defined BUSTAIM_DISABLE_WSTATS
stock BustAim::GetTeleportStats(playerid,Float:arr[],sz sizeof(arr))
{
    #pragma unused playerid
    #pragma unused arr
    #pragma unused sz
    print("[BUST-AIM] GetTeleportStats must not be used when WSTATS is disabled.");
}
stock BustAim::GetRandomAimStats(playerid,Float:arr[],sz sizeof(arr))
{
    #pragma unused playerid
    #pragma unused arr
    #pragma unused sz
    print("[BUST-AIM] GetAimStats must not be used when WSTATS is disabled.");
}
stock BustAim::GetRangeStats(playerid,Float:arr[],sz sizeof(arr))
{
    #pragma unused playerid
    #pragma unused arr
    #pragma unused sz
    print("[BUST-AIM] GetRangeStats must not be used when WSTATS is disabled.");
}
#else
stock BustAim::GetTeleportStats(playerid,Float:arr[],sz sizeof(arr))
{
    memcpy(_:arr,_:BustAim_g_TeleportWarningStats[playerid],0,sz*4,sz);
}
stock BustAim::GetRandomAimStats(playerid,Float:arr[],sz sizeof(arr))
{
    memcpy(_:arr,_:BustAim_g_AimWarningStats[playerid],0,sz*4,sz);
}
stock BustAim::GetRangeStats(playerid,Float:arr[],sz sizeof(arr))
{
    memcpy(_:arr,_:BustAim_g_RangeWarningStats[playerid],0,sz*4,sz);
}
#endif

#if defined BUSTAIM_DISABLE_PROFILING
stock BustAim::GetPlayerWeaponProfile(playerid,weaponid,&allshots,&hitshots,&max_cont_shots,&out_of_range_warns,&random_aim_warns,&proaim_tele_warns)
{
    #pragma unused playerid
    #pragma unused weaponid
    print("[BUST-AIM] GetPlayerWeaponProfile must not be used when profiling is disabled.");
}
stock BustAim::ResetPlayerWeaponProfile(playerid,weaponid)
{
    #pragma unused playerid
    #pragma unused weaponid
    print("[BUST-AIM] ResetWeaponProfile must not be used when profiling is disabled");
}
stock BustAim::GetPlayerProfile(playerid,&shotsfired,&shotshit,&max_cont_shots,&out_of_range_warns,&random_aim_warns,&proaim_tele_warns)
{
    #pragma unused playerid
    print("[BUST-AIM] GetPlayerProfile must not be used when profiling is disabled.");
}
stock BustAim::ResetPlayerProfile(playerid)
{
    #pragma unused playerid
    print("[BUST-AIM] ResetPlayerProfile must not be used when profiling is disabled.");
}
#else
stock BustAim::GetPlayerWeaponProfile(playerid,weaponid,&allshots,&hitshots,&max_cont_shots,&out_of_range_warns,&random_aim_warns,&proaim_tele_warns)
{
    if(22 <= weaponid <= 39)
    {
        weaponid -= 22;
        allshots BustAim_g_ShotsFired[playerid][weaponid];
        hitshots BustAim_g_ShotsHit[playerid][weaponid];
        max_cont_shots BustAim_g_MaxContinousShots[playerid][weaponid];
        out_of_range_warns BustAim_g_TotalOutOfRangeWarns[playerid][weaponid];
          random_aim_warns BustAim_g_TotalRandomAimWarns[playerid][weaponid];
        proaim_tele_warns BustAim_g_TotalTeleportWarns[playerid][weaponid];
        return 0;
    }
    return 1;
}
stock BustAim::ResetPlayerWeaponProfile(playerid,weaponid)
{
    if(22 <= weaponid <= 39)
    {
        weaponid -= 22;
        BustAim_g_ShotsFired[playerid][weaponid] =
        BustAim_g_ShotsHit[playerid][weaponid] =
        BustAim_g_MaxContinousShots[playerid][weaponid] =
        BustAim_g_TotalOutOfRangeWarns[playerid][weaponid] =
        BustAim_g_TotalRandomAimWarns[playerid][weaponid] =
        BustAim_g_TotalTeleportWarns[playerid][weaponid] = 0;
        return 0;
    }
    return 1;
}
stock BustAim::GetPlayerProfile(playerid,&shotsfired,&shotshit,&max_cont_shots,&out_of_range_warns,&random_aim_warns,&proaim_tele_warns)
{
    for(new 0;BS_TOTAL_SHOOTING_WEAPONS;i++)
    {
        shotsfired += BustAim_g_ShotsFired[playerid][i];
        shotshit += BustAim_g_ShotsHit[playerid][i];
        out_of_range_warns += BustAim_g_TotalOutOfRangeWarns[playerid][i];
        random_aim_warns += BustAim_g_TotalRandomAimWarns[playerid][i];
        proaim_tele_warns+= BustAim_g_TotalTeleportWarns[playerid][i];
        if(BustAim_g_MaxContinousShots[playerid][i] > max_cont_shots)
            max_cont_shots BustAim_g_MaxContinousShots[playerid][i];
    }
    return 1;
}
stock BustAim::ResetPlayerProfile(playerid)
{
       Fill68(BustAim_g_TotalRandomAimWarns[playerid]);
    Fill68(BustAim_g_TotalTeleportWarns[playerid]);
    Fill68(BustAim_g_TotalOutOfRangeWarns[playerid]);
    Fill68(BustAim_g_ShotsFired[playerid]);
    Fill68(BustAim_g_ShotsHit[playerid]);
    Fill68(BustAim_g_MaxContinousShots[playerid]);
    return 0;
}
#endif
stock BustAim::SetPlayerFlags(playerid,flags)
{
    BustAim_g_PlayerSettings{playerid} = flags;
}
stock BustAim::GetPlayerFlags(playerid,&flags)
{
    flags BustAim_g_PlayerSettings{playerid};
}
stock BustAim::ResetPlayerFlags(playerid)
{
    BustAim_g_PlayerSettings{playerid} = BUSTAIM_DEFAULT_PLAYER_FLAGS;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static stock Fill68(loc[])
{
    new val 0;
      #emit LOAD.S.alt loc
    #emit LOAD.S.pri val
    #emit FILL 68
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
    BustAim_g_PlayerSettings{playerid} = BUSTAIM_DEFAULT_PLAYER_FLAGS;
    BustAim_g_IntrnlPlayerSettings{playerid} =
    BustAim_g_ContinousShots{playerid} =
    BustAim_g_RandomAimShots{playerid} =
    BustAim_g_TeleportShots{playerid} =
    BustAim_g_OutOfRangeShots{playerid} = 0;
    #if !defined BUSTAIM_DISABLE_PROFILING
        Fill68(BustAim_g_TotalRandomAimWarns[playerid]);
        Fill68(BustAim_g_TotalTeleportWarns[playerid]);
        Fill68(BustAim_g_TotalOutOfRangeWarns[playerid]);
        Fill68(BustAim_g_ShotsFired[playerid]);
        Fill68(BustAim_g_ShotsHit[playerid]);
        Fill68(BustAim_g_MaxContinousShots[playerid]);
    #endif

    #if defined BustAim_OnPlayerConnect
        return BustAim_OnPlayerConnect(playerid);
    #else
        return 1;
    #endif
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif

#define OnPlayerConnect BustAim_OnPlayerConnect

#if defined BustAim_OnPlayerConnect
    forward BustAim_OnPlayerConnect(playerid);
#endif

#if !defined BUSTAIM_IS_PAUSED_FUNCTION
    public OnPlayerUpdate(playerid)
    {
        BustAim_g_LastUpdateTick[playerid] = GetTickCount();

        #if defined BustAim_OnPlayerUpdate
            return BustAim_OnPlayerUpdate(playerid);
        #else
            return 1;
        #endif
    }
    #if defined _ALS_OnPlayerUpdate
    #undef OnPlayerUpdate
    #else
    #define _ALS_OnPlayerUpdate
    #endif

    #define OnPlayerUpdate BustAim_OnPlayerUpdate

    #if defined BustAim_OnPlayerUpdate
        forward BustAim_OnPlayerUpdate(playerid);
    #endif
#endif


Podpis
GG: 61963221 - Discord: NitroFuN#2819


Gracz SA:MP - 2010-2019
Support Team - 26.11.2017 - 16.01.2018

Postaw piwo autorowi tego posta
 

 
Tagi: impreza :: v2/imprezaserver
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » Mapy do SA-MP » [DM] Impreza DM v2/ImprezaServer Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku