10.11.2010, 21:26
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
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;
}


