Ok, I'm making antibhophack plugin.
Currently I've made correctly only one type of detections out of two possible.
Second is looping aka _special aka (whatever or kzh by default)_loopx.
At the moment I'm using this code to detect it:
PHP Code:
public fwdCmdStart(id, uc_handle, seed)
{
if(is_user_alive(id) && is_user_connected(id))
{
static iButtons, s_iOldButtons[33], s_iFrameCounter[33], s_iScrollCounter[33];
iButtons = get_uc(uc_handle, UC_Buttons);
if(s_iOldButtons[id] & IN_JUMP && !(iButtons & IN_JUMP))
s_iFrameCounter[id] = 0;
else if(iButtons & IN_JUMP && !(s_iOldButtons[id] & IN_JUMP) && 1 <= s_iFrameCounter[id] && s_iFrameCounter[id] <= 5)
s_iScrollCounter[id]++;
if(s_iScrollCounter[id] >= 10)
{
s_iScrollCounter[id] = 0;
new szName[32];
get_user_name(id, szName, 31);
client_print(0, print_chat, "** Bhop hack detected on %s! Reason: jump loopings(poss _special or kzh_loopx).", szName);
//kick_user(id, "Bhop hack detected!");
}
if(s_iFrameCounter[id] >= 40) s_iScrollCounter[id] = 0;
s_iOldButtons[id] = iButtons;
s_iFrameCounter[id]++;
}
}
But this detects it if I jump with scroll.. What is wrong with that?
__________________