Question about anti weapon hack
#1

Hello just a fast question
what's better?
Using a timer to check the weapon in player hand
or using OnPlayerUpdate?
Thanks.
Reply
#2

PHP код:
forward Update();
public 
Update()
{
switch(
GetPlayerWeapon(i))
{
    case 
23567891011121314151718263538424445:
    {
        new 
HackerName[MAX_PLAYER_NAME];
        
GetPlayerName(iHackerNamesizeof(HackerName));
        new 
string[128];
        
format(stringsizeof(string), "Banning: %s [Reason: Weapon Hacks]"HackerName);
        
SendClientMessageToAll(COLOR_REDstring);
        
BanEx(i"Invalid Weapon - Weapon Hacks");
}
}
            new 
weapon;
            new 
gunammo;
            for(new 
0<13w++) {
                
GetPlayerWeaponData(iwweapongunammo);
                if(( 
weapon == 26 || weapon == 32 || weapon == 38 || weapon == 44 || weapon == 45) && gunammo 0) {
                    new 
HackerName[MAX_PLAYER_NAME];
                    
GetPlayerName(iHackerNamesizeof(HackerName));
                    new 
string[128];
                    
format(stringsizeof(string), "Banning: %s [Reason: Weapon Hacks]"HackerName);
                    
SendClientMessageToAll(COLOR_REDstring);
                    
BanEx(i"Invalid Weapon - Weapon Hacks");
                    return 
1;
                }
            } 
Reply
#3

I say OnPlayerUpdate is better, check my anti cheat tips thread for more information
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)