Which one is better for an anti weapon cheat? -
OrlGiNS - 10.11.2010
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;
}
Re: Which one is better for an anti weapon cheat? -
rs.pect - 10.11.2010
Use GetPlayerWeaponData if you want to ban players that generally have disallowed weapon.
Use GetPlayerWeapon to ban players that currently have equiped disallowed weapon.
Re: Which one is better for an anti weapon cheat? -
OrlGiNS - 10.11.2010
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.
Re: Which one is better for an anti weapon cheat? -
Memoryz - 11.11.2010
GetPlayerWeapon will only work for the weapon the player has equipped.
Re: Which one is better for an anti weapon cheat? -
(SF)Noobanatior - 11.11.2010
did you see him fire it or did he spoof kill someone with it?
Re: Which one is better for an anti weapon cheat? -
cessil - 11.11.2010
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.
Re: Which one is better for an anti weapon cheat? -
OrlGiNS - 11.11.2010
Quote:
Originally Posted by (SF)Noobanatior
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
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.