Duty Mod system
#3

Forbbiden Weapons!

pawn Код:
forward WeaponCheck
public WeaponCheck(playerid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        new lbweapon[64];
        new string[128];
        new var;
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);

        var=GetPlayerWeapon(i);
        if(IsForbiddenWeapon(var) && WeaponForbiddenForPlayer[i][var] && AccInfo[i][Level] == 0 && ServerInfo[ForbiddenWeaps] == 1)
        {
            SendClientMessage(i,lightred, "|- You have been Automatically Banned. | Reason: WeaponHack -| ");

            GetWeaponName(var,lbweapon,sizeof(lbweapon));
            format(lbweapon,sizeof(lbweapon),"Weapon Cheat (%s)",lbweapon);
            BanEx(i,lbweapon);

            format(string,sizeof(string),"|- Player %s (Id:%d) has been Automatically Banned. | Reason: Weapon Hack -|",PlayerName,i);
            SendClientMessageToAll(lightred, string);

            new str[128];
            format(str,sizeof(str),"%s has been Automatically Banned. | Reason: WeaponHack",PlayerName);
            SaveIn("BanLog",str);
        }
    }
    return 1;
}
//========================
I'm using INI, I just want to know to to do it!
Reply


Messages In This Thread
Duty Mod system - by ThePhenix - 21.08.2012, 21:26
Re: Duty Mod system - by =WoR=G4M3Ov3r - 21.08.2012, 21:29
Re: Duty Mod system - by ThePhenix - 21.08.2012, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)