Which one is better for an anti weapon cheat?
#1

Well I've been using an Anti cheat with GetPlayerWeaponData, and today I found a cheater in the server bypassing it..

Is GetPlayerWeapon better? :S

Btw, this the script being used with the GetPlayerWeaponData

SetTimer("AntiCheat", 100, true);//Ongamemodeinit


Code:
public Anti_Cheat()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
	{
            if(accInfo[i][adminPower] == 0) //Means that if the player isn't an admin he goes Ban_yo
            {
                new weapon;
                new ammo;
                new string[128];
                GetPlayerWeaponData(i, 7, weapon, ammo);
		if(weapon == 38 && ammo >= 1)
	        {
		    SendClientMessage(i, RED, "[CHEAT]:Banned user for Minigun!");
	            format(string, sizeof(string), "[CHEAT]: %s [ID:%d] got banned for using minigun.", GetName(i), i);
	            SendClientMessageToAll(0xB90000AA, string);
		    BanEx(i,"CHEAT - Minigun");
	        }
            }
         }
     }
     return 1;
}
Reply
#2

Use GetPlayerWeaponData if you want to ban players that generally have disallowed weapon.
Use GetPlayerWeapon to ban players that currently have equiped disallowed weapon.
Reply
#3

Uhhh I'm still a bit confused, since I use GetPlayerWeaponData I never had problems until today...
Minigun was not allowed and still a cheater was able to use it without getting ban.. He bypassed it, so I was wondering if GetPlayerWeapon would solve the problem.
Reply
#4

GetPlayerWeapon will only work for the weapon the player has equipped.
Reply
#5

did you see him fire it or did he spoof kill someone with it?
Reply
#6

I've seen a lot of cheaters with - ammo, just check that he's alive, onfoot, spawned and has the weapon, don't worry about the ammo amount.
Reply
#7

Quote:
Originally Posted by (SF)Noobanatior
View Post
did you see him fire it or did he spoof kill someone with it?
He was just walking with the gun on its hands, and he shouldn't be able to do that.

Quote:
Originally Posted by cessil
View Post
I've seen a lot of cheaters with - ammo, just check that he's alive, onfoot, spawned and has the weapon, don't worry about the ammo amount.
That might result, I will try that thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)