[PEDIDO] /dararma sem o ant-xiter acusar
#1

Tipo vi um server que tinha anti-cheater , mas , se um admin usava /dararma , e por exemplo pegava uma minigun , o sistema nгo bania , e eu queria fazer isso , e queria pedir a ajuda de vcs , vlw.

meu codigo de anti-cheater :
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
// Minigun
                if(GetPlayerWeapon(i) == 38)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Minigun /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
// Rocket Launcher
                else if(GetPlayerWeapon(i) == 35)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um Rocket Launcher /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }

// Lanзa chamas
                else if(GetPlayerWeapon(i) == 37)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um Lanзa Chamas /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
// Visгo Noturna
                else if(GetPlayerWeapon(i) == 44)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "%s ANTICHEAT: %s[ID %d] estб usando uma Visгo Noturna /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
// Visгo de Calor
                else if(GetPlayerWeapon(i) == 45)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Visгo de Calor /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Serra Eletrica
                else if(GetPlayerWeapon(i) == 9)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Serra Eletrica /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Sawn-off
                else if(GetPlayerWeapon(i) == 26)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Sawn-off /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Combat shotgun
                else if(GetPlayerWeapon(i) == 27)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Combat shotgun /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Molotov
                else if(GetPlayerWeapon(i) == 18)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um Molotov /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Micro Uzi
                else if(GetPlayerWeapon(i) == 28)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Micro Uzi /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Tec 9
                else if(GetPlayerWeapon(i) == 32)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma TEC-9 /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
//Bazooca
                else if(GetPlayerWeapon(i) == 36)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando uma Bazooca  /tv nele rapido", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                SetPlayerPos(i,-123.7512,-2869.0913,183.3834+600);
                //ResetPlayerWeaponsEx(i);
                SetPlayerArmedWeapon(i, 0);
                }
            }
    }
    return 1;
}

Meu /dararma :

pawn Код:
//----------------------------------[Dar Arma]------------------------------------------------
    if(strcmp(cmd, "/dararma", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /dararma [id] [arma id(ex. 24 = Eagle)] [muniзгo]");
                return 1;
            }
            new playa;
            new gun;
            new ammo;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            gun = strval(tmp);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "USE: /dararma [id] [arma id] [muniзгo]");
                MSGPLAYER(playerid, COLOR_GRAD4, "3(Cassetete) 4(Faca) 5(Taco de Baseball) 6(Pб) 7(Espada) 8(Katana) 10-13(Vibrador) 14(Flores) 16(Granadas) 17(Granada Gбs) 18(Molotovs) 22(Pistola)");
                MSGPLAYER(playerid, COLOR_GRAD3, "23(Pistola com Silenciador) 24(Eagle) 25(Escopeta) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Lanзa Chamas) 38(MiniGun) 41(spray) 42(extintor) 43(Camera) 46(Paraquedas)");
                return 1;
            }
            if(gun < 0 || gun > 0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0 || gun==0)
            { MSGPLAYER(playerid, COLOR_GRAD1, "   ID Proibido!"); return 1; }
            tmp = strtok(cmdtext, idx);
            ammo = strval(tmp);
            if(ammo <1||ammo > 9999)
            { MSGPLAYER(playerid, COLOR_GRAD1, "   O minimo de muniзгo й 1 e o mбximo й 9999!"); return 1; }
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
                {
                    MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
                    return 1;
                }
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GivePlayerWeapon(playa, gun, ammo);
                    }
                }
            }
            else
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 1;
    }
Reply
#2

me ajudem pf
Reply
#3

topo: new ArmaADM[MAX_PLAYERS];
/dararma: ArmaADM[playerid] = 1;
anticheat: else if(... && ArmaADM[playerid] != 1)

Й uma base...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)