Auto minigun and Rocket launcher ban
#1

hai all,i need to add instant ban for Rocket Launcher (not heatseeker) and minigun.

Ex: If player have minigun,he will be instantly banned.

how?
Reply
#2

You can try using this
Reply
#3

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
You can try using this
He said instantly banned so this should do the trick:

pawn Код:
#include <a_samp>

//AntiCheat
new timer1;

public OnGameModeInit()
{
    timer1 = SetTimer("AntiCheat",5000,true);
    return 1;
}

forward AntiCheat();
public AntiCheat()
{
    new weap, ammo;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 38)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Minigun Cheat)", pName);
                SendClientMessageToAll(0xFF0000FF, string);
                BanEx(i, "AntiCheat - Minigun");
                break;
            }
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 35)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Rocket launcher Cheat)", pName);
                SendClientMessageToAll(0xFF0000FF, string);
                BanEx(i, "AntiCheat - Rocket Launcher");
                break;
            }
        }
    }
    return 1;
}

public OnGameModeExit()
{
    KillTimer(timer1);
    return 1;
}
Reply
#4

Ty guys
Reply
#5

Another question,how to show the banned message (XXX has been autobanned for minigun) in an echo chan?

I use incognito irc plugin,i need to add something?
Reply
#6

pawn Код:
IRC_Say(botid, channel, string);
just add it under BanEx
Reply
#7

Код:
C:\Documents and Settings\Utente\Desktop\anrpg.pwn(29) : error 017: undefined symbol "IRC_Say"
C:\Documents and Settings\Utente\Desktop\anrpg.pwn(41) : error 017: undefined symbol "IRC_Say"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
lol

P.S. I use as filterscript.
Reply
#8

Quote:
Originally Posted by BP13
Посмотреть сообщение
He said instantly banned so this should do the trick:

pawn Код:
#include <a_samp>

//AntiCheat
new timer1;

public OnGameModeInit()
{
    timer1 = SetTimer("AntiCheat",5000,true);
    return 1;
}

forward AntiCheat();
public AntiCheat()
{
    new weap, ammo;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 38)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Minigun Cheat)", pName);
                SendClientMessageToAll(0xFF0000FF, string);
                BanEx(i, "AntiCheat - Minigun");
                break;
            }
            GetPlayerWeaponData(i, 7, weap, ammo);
            if(weap == 35)
            {
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "BANNED: %s has been auto banned by console. (Reason: Rocket launcher Cheat)", pName);
                SendClientMessageToAll(0xFF0000FF, string);
                BanEx(i, "AntiCheat - Rocket Launcher");
                break;
            }
        }
    }
    return 1;
}

public OnGameModeExit()
{
    KillTimer(timer1);
    return 1;
}
This code will show if the player was banned. Isn't working?
Reply
#9

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
This code will show if the player was banned. Isn't working?
Huh? This is a timer that auto bans for those 2 weapons.
Reply
#10

Quote:
Originally Posted by BP13
Посмотреть сообщение
Huh? This is a timer that auto bans for those 2 weapons.
Ye I know, I was talking to Logitech90.

Which IRC Plugin are you using?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)