[Pedido] Detector de armas de armas pelo S.O.B.E.I.T.
#1

Bom procurei muito um ant cheater que detecta quando player pega alguma arma pelo S.O.B.E.I.T mas nao achei, se alguem souber onde posso achar ou possa me ajudar a criar um agradeзo.
Reply
#2

Olб Leo_Lost,

@autor: Mittos (acho)

pawn Код:
#include <foreach>

#if defined _anticheat_included
  #endinput
#endif
#define _anticheat_included

#if defined MAX_PLAYERS
    #undef MAX_PLAYERS
    #define MAX_PLAYERS 100 //Nъmero de slots do seu servidor.
#endif

/*
native SetPlayerWeapon(playerid,weaponid,ammo);
native DeletePlayerWeapons(playerid);
native SetPlayerAmmoPerSlot(playerid,weaponslot,ammo);
native GetWeaponSlot(weaponid);
*/

enum ginfo
{
    gGun0,
    gGun1,
    gGun2,
    gAmmo2,
    gGun3,
    gAmmo3,
    gGun4,
    gAmmo4,
    gGun5,
    gAmmo5,
    gGun6,
    gAmmo6,
    gGun7,
    gAmmo7,
    gGun8,
    gAmmo8,
    gGun9,
    gAmmo9,
    gGun10,
    gGun11,
    gGun12,
}

new GunInfo[MAX_PLAYERS][ginfo];
new AnticheatTimer;

forward AnticheatStart(time);
public AnticheatStart(time)
{
    AnticheatTimer = SetTimer("UpdateAntiCheat", time, 1);
    return 1;
}

forward AnticheatDead();
public AnticheatDead()
{
    KillTimer(AnticheatTimer);
    return 1;
}

forward UpdateAntiCheat();
public UpdateAntiCheat()
{
    foreach(Player, i)
    {
        if(!IsPlayerConnected(i)) return 1;
        new weapon,ammo;
        weapon = GetPlayerWeapon(i);
        ammo = GetPlayerAmmo(i);

        if(weapon == 1) {//--->Brass Knuckles
            if(GunInfo[i][gGun0] != 1)
                return DetectNoob(i, 1, 0);
        }
        if(weapon == 2) { //--->Golf Club
            if(GunInfo[i][gGun1] != 2)
                return DetectNoob(i,2,0);
        }
        if(weapon == 3) {//--->Nite Stick
            if(GunInfo[i][gGun1] != 3)
                return DetectNoob(i,3,0);
        }
        if(weapon == 4) {//--->Knife
            if(GunInfo[i][gGun1] != 4)
                return DetectNoob(i,4,0);
        }
        if(weapon == 5) {//--->Baseball Bat
            if(GunInfo[i][gGun1] != 5)
                return DetectNoob(i,5,0);
        }
        if(weapon == 6) {//--->Shovel
            if(GunInfo[i][gGun1] != 6)
                return DetectNoob(i,6,0);
        }
        if(weapon == 7) {//--->Pool Cue
            if(GunInfo[i][gGun1] != 7)
                return DetectNoob(i,7,0);
        }
        if(weapon == 8) {//--->Katana
            if(GunInfo[i][gGun1] != 8)
                return DetectNoob(i,8,0);
        }
        if(weapon == 9) {//--->Chainsaw
            if(GunInfo[i][gGun1] != 9)
                return DetectNoob(i,9,0);
        }
        if(weapon == 10) {//--->Purple Dildo
            if(GunInfo[i][gGun10] != 10)
                return DetectNoob(i,10,0);
        }
        if(weapon == 11) {//--->Small White Vibrator
            if(GunInfo[i][gGun10] != 11)
                return DetectNoob(i,11,0);
        }
        if(weapon == 12) {//--->Large White Vibrator
            if(GunInfo[i][gGun10] != 12)
                return DetectNoob(i,12,0);
        }
        if(weapon == 13) {//--->Silver Vibrator
            if(GunInfo[i][gGun10] != 13)
                return DetectNoob(i,13,0);
        }
        if(weapon == 14) {//--->Flowers
            if(GunInfo[i][gGun10] != 14)
                return DetectNoob(i,14,0);
        }
        if(weapon == 15) {//--->Cane
            if(GunInfo[i][gGun10] != 15)
                return DetectNoob(i,15,0);
        }
        if(weapon == 16) {//--->Grenade
            if(GunInfo[i][gGun8] != 16)
                return DetectNoob(i,16,0);
            if(GunInfo[i][gAmmo8] < ammo)
                return DetectNoob(i,16,1);
            GunInfo[i][gAmmo8] = ammo;
        }
        if(weapon == 17) {//--->Tear Gas
            if(GunInfo[i][gGun8] != 17)
                return DetectNoob(i,17,0);
            if(GunInfo[i][gAmmo8] < ammo)
                return DetectNoob(i,17,1);
            GunInfo[i][gAmmo8] = ammo;
        }
        if(weapon == 18) {//--->Molotov Cocktail
            if(GunInfo[i][gGun8] != 18)
                return DetectNoob(i,18,0);
            if(GunInfo[i][gAmmo8] < ammo)
                return DetectNoob(i,18,1);
            GunInfo[i][gAmmo8] = ammo;
        }
        if(weapon == 22) {//--->9mm
            if(GunInfo[i][gGun2] != 22)
                return DetectNoob(i,22,0);
            if(GunInfo[i][gAmmo2] < ammo)
                return DetectNoob(i,22,1);
            GunInfo[i][gAmmo2] = ammo;
        }
        if(weapon == 23) {//--->Silenced 9mm
            if(GunInfo[i][gGun2] != 23)
                return DetectNoob(i,23,0);
            if(GunInfo[i][gAmmo2] < ammo)
                return DetectNoob(i,23,1);
            GunInfo[i][gAmmo2] = ammo;
        }
        if(weapon == 24) {//--->Desert Eagle
            if(GunInfo[i][gGun2] != 24)
                return DetectNoob(i,24,0);
            if(GunInfo[i][gAmmo2] < ammo)
                return DetectNoob(i,24,1);
            GunInfo[i][gAmmo2] = ammo;
        }
        if(weapon == 25) {//--->Shotgun
            if(GunInfo[i][gGun3] != 25)
                return DetectNoob(i,25,0);
            if(GunInfo[i][gAmmo3] < ammo)
                return DetectNoob(i,25,1);
            GunInfo[i][gAmmo5] = ammo;
        }
        if(weapon == 26) {//--->Sawn-off Shotgun
            if(GunInfo[i][gGun3] != 26)
                return DetectNoob(i,26,0);
            if(GunInfo[i][gAmmo3] < ammo)
                return DetectNoob(i,26,1);
            GunInfo[i][gAmmo3] = ammo;
        }
        if(weapon == 27) {//--->Combat Shotgun
            if(GunInfo[i][gGun3] != 27)
                return DetectNoob(i,27,0);
            if(GunInfo[i][gAmmo3] < ammo)
                return DetectNoob(i,27,1);
            GunInfo[i][gAmmo3] = ammo;
        }
        if(weapon == 28) {//--->Micro SMG
            if(GunInfo[i][gGun4] != 28)
                return DetectNoob(i,28,0);
            if(GunInfo[i][gAmmo4] < ammo)
                return DetectNoob(i,28,1);
            GunInfo[i][gAmmo4] = ammo;
        }
        if(weapon == 29) {//--->MP5
            if(GunInfo[i][gGun4] != 29)
                return DetectNoob(i,29,0);
            if(GunInfo[i][gAmmo4] < ammo)
                return DetectNoob(i,29,1);
            GunInfo[i][gAmmo4] = ammo;
        }
        if(weapon == 30) {//--->AK-47
            if(GunInfo[i][gGun5] != 30)
                return DetectNoob(i,30,0);
            if(GunInfo[i][gAmmo5] < ammo)
                return DetectNoob(i,30,1);
            GunInfo[i][gAmmo5] = ammo;
            return 1;
        }
        if(weapon == 31) {//--->M4
            if(GunInfo[i][gGun5] != 31)
                return DetectNoob(i,31,0);
            if(GunInfo[i][gAmmo5] < ammo)
                return DetectNoob(i,31,1);
            GunInfo[i][gAmmo5] = ammo;
        }
        if(weapon == 32) {//--->Tec9
            if(GunInfo[i][gGun5] != 32)
                return DetectNoob(i,32,0);
            if(GunInfo[i][gAmmo5] < ammo)
                return DetectNoob(i,32,1);
            GunInfo[i][gAmmo5] = ammo;
        }
        if(weapon == 33) {//--->Country Rifle
            if(GunInfo[i][gGun6] != 33)
                return DetectNoob(i,33,0);
            if(GunInfo[i][gAmmo6] < ammo)
                return DetectNoob(i,33,1);
            GunInfo[i][gAmmo6] = ammo;
        }
        if(weapon == 34) {//--->Sniper Rifle
            if(GunInfo[i][gGun6] != 34)
                return DetectNoob(i,34,0);
            if(GunInfo[i][gAmmo6] < ammo)
                return DetectNoob(i,34,1);
            GunInfo[i][gAmmo6] = ammo;
        }
        if(weapon == 35) {//--->Rocket Launcher
            if(GunInfo[i][gGun7] != 35)
                return DetectNoob(i,35,0);
            if(GunInfo[i][gAmmo7] < ammo)
                return DetectNoob(i,35,1);
            GunInfo[i][gAmmo7] = ammo;
        }
        if(weapon == 36) {//--->HS Rocket Launcher
            if(GunInfo[i][gGun7] != 36)
                return DetectNoob(i,36,0);
            if(GunInfo[i][gAmmo7] < ammo)
                return DetectNoob(i,36,1);
            GunInfo[i][gAmmo7] = ammo;
        }
        if(weapon == 37) {//--->Flamethrower
            if(GunInfo[i][gGun7] != 37)
                return DetectNoob(i,37,0);
            if(GunInfo[i][gAmmo7] < ammo)
                return DetectNoob(i,37,1);
            GunInfo[i][gAmmo7] = ammo;
        }
        if(weapon == 38) {//--->Minigun
            if(GunInfo[i][gGun7] != 38)
                return DetectNoob(i,38,0);
            if(GunInfo[i][gAmmo7] < ammo)
                return DetectNoob(i,38,1);
            GunInfo[i][gAmmo7] = ammo;
        }
        if(weapon == 39) {//--->Satchel Charge
            if(GunInfo[i][gGun8] != 39)
                return DetectNoob(i,39,0);
            if(GunInfo[i][gAmmo8] < ammo)
                return DetectNoob(i,39,1);
            GunInfo[i][gAmmo8] = ammo;
        }
        if(weapon == 40) {//--->Detonator
            if(GunInfo[i][gGun12] != 40)
                return DetectNoob(i,40,0);
        }
        if(weapon == 41) {//--->Spraycan
            if(GunInfo[i][gGun9] != 41)
                return DetectNoob(i,41,0);
            if(GunInfo[i][gAmmo9] < ammo)
                return DetectNoob(i,41,1);
            GunInfo[i][gAmmo9] = ammo;
        }
        if(weapon == 42) {//--->Fire Extinguisher
            if(GunInfo[i][gGun9] != 42)
                return DetectNoob(i,42,0);
            if(GunInfo[i][gAmmo9] < ammo)
                return DetectNoob(i,42,1);
            GunInfo[i][gAmmo9] = ammo;
        }
        if(weapon == 43) {//--->Camera
            if(GunInfo[i][gGun9] != 43)
                return DetectNoob(i,43,0);
            if(GunInfo[i][gAmmo9] < ammo)
                return DetectNoob(i,43,1);
            GunInfo[i][gAmmo5] = ammo;
        }
        if(weapon == 44) {//--->Nightvision Goggles
            if(GunInfo[i][gGun11] != 44)
                return DetectNoob(i,44,0);
        }
        if(weapon == 45) {//--->Thermal Goggles
            if(GunInfo[i][gGun11] != 45)
                return DetectNoob(i,45,0);
        }
        if(weapon == 46) {//--->Parachute
            if(GunInfo[i][gGun11] != 46)
                return DetectNoob(i,46,0);
        }
    }
    return 1;
}

stock SetPlayerWeapon(playerid, weaponid, ammo)
{
    new wammo, fammo;
    switch(weaponid)
    {
        case 0,1:
        GunInfo[playerid][gGun0] = weaponid;
        case 2 .. 9:
        GunInfo[playerid][gGun1] = weaponid;
        case 10 .. 15:
        GunInfo[playerid][gGun10] = weaponid;
        case 16 .. 18, 39:
        GunInfo[playerid][gGun8] = weaponid;
        case 22 .. 24:
        GunInfo[playerid][gGun2] = weaponid;
        case 25 .. 27:
        GunInfo[playerid][gGun3] = weaponid;
        case 28, 29, 32:
        GunInfo[playerid][gGun4] = weaponid;
        case 30, 31:
        GunInfo[playerid][gGun5] = weaponid;
        case 33, 34:
        GunInfo[playerid][gGun6] = weaponid;
        case 35 .. 38:
        GunInfo[playerid][gGun7] = weaponid;
        case 40:
        GunInfo[playerid][gGun12] = weaponid;
        case 41 .. 43:
        GunInfo[playerid][gGun9] = weaponid;
        case 44 .. 46:
        GunInfo[playerid][gGun11] = weaponid;
    }
    switch(weaponid)
    {
        case 16 .. 18, 39:
        wammo = GunInfo[playerid][gAmmo8];
        case 22 .. 24:
        wammo = GunInfo[playerid][gAmmo2];
        case 25 .. 27:
        wammo = GunInfo[playerid][gAmmo3];
        case 28, 29, 32:
        wammo = GunInfo[playerid][gAmmo4];
        case 30, 31:
        wammo = GunInfo[playerid][gAmmo5];
        case 33, 34:
        wammo = GunInfo[playerid][gAmmo6];
        case 35 .. 38:
        wammo = GunInfo[playerid][gAmmo7];
        case 41 .. 43:
        wammo = GunInfo[playerid][gAmmo9];
    }
    fammo = ammo+wammo;
    switch(weaponid)
    {
        case 16 .. 18, 39:
        GunInfo[playerid][gAmmo8] = fammo;
        case 22 .. 24:
        GunInfo[playerid][gAmmo2] = fammo;
        case 25 .. 27:
        GunInfo[playerid][gAmmo3] = fammo;
        case 28, 29, 32:
        GunInfo[playerid][gAmmo4] = fammo;
        case 30, 31:
        GunInfo[playerid][gAmmo5] = fammo;
        case 33, 34:
        GunInfo[playerid][gAmmo6] = fammo;
        case 35 .. 38:
        GunInfo[playerid][gAmmo7] = fammo;
        case 41 .. 43:
        GunInfo[playerid][gAmmo9] = fammo;
    }
    GivePlayerWeapon(playerid,weaponid,ammo);
}

stock SetPlayerAmmoPerSlot(playerid, weaponslot, ammo)
{
    switch(weaponslot)
    {
        case 2:
        GunInfo[playerid][gAmmo2] = ammo;
        case 3:
        GunInfo[playerid][gAmmo3] = ammo;
        case 4:
        GunInfo[playerid][gAmmo4] = ammo;
        case 5:
        GunInfo[playerid][gAmmo5] = ammo;
        case 6:
        GunInfo[playerid][gAmmo6] = ammo;
        case 7:
        GunInfo[playerid][gAmmo7] = ammo;
        case 8:
        GunInfo[playerid][gAmmo8] = ammo;
        case 9:
        GunInfo[playerid][gAmmo9] = ammo;
    }
    return SetPlayerAmmo(playerid, weaponslot, ammo);
}

stock GetWeaponSlot(weaponid)
{
    new slot;
    switch(weaponid)
    {
        case 0,1: slot = 0;
        case 2 .. 9: slot = 1;
        case 10 .. 15: slot = 10;
        case 16 .. 18, 39: slot = 8;
        case 22 .. 24: slot =2;
        case 25 .. 27: slot = 3;
        case 28, 29, 32: slot = 4;
        case 30, 31: slot = 5;
        case 33, 34: slot = 6;
        case 35 .. 38: slot = 7;
        case 40: slot = 12;
        case 41 .. 43: slot = 9;
        case 44 .. 46: slot = 11;
    }
    return slot;
}

stock DeletePlayerWeapons(playerid)
{
    GunInfo[playerid][gGun0] = 0;
    GunInfo[playerid][gGun1] = 0;
    GunInfo[playerid][gGun2] = 0;
    GunInfo[playerid][gGun3] = 0;
    GunInfo[playerid][gGun4] = 0;
    GunInfo[playerid][gGun5] = 0;
    GunInfo[playerid][gGun6] = 0;
    GunInfo[playerid][gGun7] = 0;
    GunInfo[playerid][gGun8] = 0;
    GunInfo[playerid][gGun9] = 0;
    GunInfo[playerid][gGun10] = 0;
    GunInfo[playerid][gGun11] = 0;
    GunInfo[playerid][gGun12] = 0;
    GunInfo[playerid][gAmmo8] = 0;
    GunInfo[playerid][gAmmo2] = 0;
    GunInfo[playerid][gAmmo3] = 0;
    GunInfo[playerid][gAmmo4] = 0;
    GunInfo[playerid][gAmmo5] = 0;
    GunInfo[playerid][gAmmo6] = 0;
    GunInfo[playerid][gAmmo7] = 0;
    GunInfo[playerid][gAmmo9] = 0;
    ResetPlayerWeapons(playerid);
}

Atenciosamente,
Falcon.
Reply
#3

Nгo foi ele quem fez, vocк acha que o tуpico foi deletado porque? xD

@edit
https://sampforum.blast.hk/showthread.php?tid=207781

Criador verdadeiro ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)