Anti-cheat didn't work
#2

that won't work unless you are ID 0
You need a loop to check through all players..

try this:
pawn Код:
public WeaponCheck()
{
    new IP[16];
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
        if(!IsPlayerConnected(playerid)) return 0;
        if( PlayerInfo[playerid][pAdmin] >=1 ) return 0;
        if( WeaponGiven[playerid] == 1 ) return 0;
        if( Logged[playerid] == 1 )
        {
           new weaponid = GetPlayerWeapon( playerid );
           if( ( weaponid >= 1 && weaponid <=45 ) )
           {
               GetPlayerName( playerid, Nam, sizeof Nam );
               GetPlayerIp( playerid, IP, 16 );
               format( mystring, sizeof mystring, "Admin-Log: %s has been banned for weapon hack(%s).", Nam, IP);
               SendAdminMessage( COLOR_RED, mystring );
               BanEx(playerid, "WEAPON HACK");
           }
       }
    }
    return 1;
}
Reply


Messages In This Thread
Anti-cheat didn't work - by Bogdan1992 - 19.01.2012, 16:19
Re: Anti-cheat didn't work - by Sascha - 19.01.2012, 16:25
Re: Anti-cheat didn't work - by Michael@Belgium - 19.01.2012, 16:29
Re: Anti-cheat didn't work - by Bogdan1992 - 19.01.2012, 18:40
Re: Anti-cheat didn't work - by GamingTurf - 19.01.2012, 18:43
Re: Anti-cheat didn't work - by Bogdan1992 - 19.01.2012, 19:00
Re: Anti-cheat didn't work - by 2KY - 19.01.2012, 19:06
Re: Anti-cheat didn't work - by Vince - 19.01.2012, 19:09
Re: Anti-cheat didn't work - by Bogdan1992 - 19.01.2012, 19:12
Re: Anti-cheat didn't work - by Tigerkiller - 19.01.2012, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)