minigun
#3

ah yes forgot:

In onplayerconnect:

Code:
WeaponTimer[playerid] = SetTimerEx("WeaponHack", 1000, true, "d",playerid);
disconnect:

Code:
KillTimer(WeaponTimer[playerid]);
public:

pawn Code:
forward WeaponHack(playerid);
public WeaponHack(playerid)
{
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1) return 0;
    new string[128];
    new w7;
    new a7;
    new day,month,year,hour,minute;
    new ip[256];
    for(new i; i < 13; i++)
    {
        GetPlayerWeaponData(playerid, i, w7, a7);
        if(w7 == 38 && a7 >= 1)
        {
                GetPlayerIp(playerid,ip,sizeof(ip));
                getdate(year,month,day);
                gettime(hour,minute);
                format(string, sizeof(string), "%s was banned from the server. [Reason: Minigun]", PlayerName(playerid));
                SendClientMessageToAll(_COLOR_RED, string);
                SendClientMessage(playerid,_COLOR_RED," ");
                SendClientMessage(playerid,_COLOR_RED," ");
                SendClientMessage(playerid,_COLOR_RED,"You was banned from this server!");
                SendClientMessage(playerid,_COLOR_WHITE,"Reason: Minigun");
                SendClientMessage(playerid,_COLOR_WHITE,"Admin: Anti-Cheat");
                format(string2, sizeof(string2), "Date: %d/%d/%d",day,month,year);
                SendClientMessage(playerid,_COLOR_WHITE,string);
                if (minute <= 9)
                {
                format(string,25,"Time: %d:0%d",hour,minute);
                SendClientMessage(playerid,_COLOR_WHITE,string);
                }
                else
                {
                format(string,25,"Time: %d:%d",hour,minute);
                SendClientMessage(playerid,_COLOR_WHITE,string);
                }
                format(string, sizeof(string), "IP: %s",ip);
                SendClientMessage(playerid,_COLOR_WHITE,string;
                if(LoggedIn[playerid] == 1) dUserSetINT(PlayerName(playerid)).("Banned",1);
                WriteBanToFile(playerid, "Anti-Cheat", "Minigun");
                BanEx(playerid,"Minigun");
                return 1;
        }
    }
    return 0;
}
btw: i don't do a for loop in my public (i = max_players etc), because i got many problems with this
Reply


Messages In This Thread
minigun - by Headshot1108 - 15.06.2010, 10:13
Re: minigun - by Naxix - 15.06.2010, 10:20
Re: minigun - by Headshot1108 - 15.06.2010, 10:30
Re: minigun - by whitedragon - 15.06.2010, 10:36
Re: minigun - by Headshot1108 - 15.06.2010, 10:37
Re: minigun - by DJDhan - 15.06.2010, 11:02
Re: minigun - by Headshot1108 - 15.06.2010, 11:23
Re: minigun - by DJDhan - 15.06.2010, 11:29
Re: minigun - by Headshot1108 - 15.06.2010, 11:30

Forum Jump:


Users browsing this thread: 3 Guest(s)