Hi, I want to check, if user is using strafe modifier.
I tried to hook +strafe / -strafe command, to detect if the player is using strafe modifier.
PHP Code:
#include <amxmodx>
#include <amxmisc>
new bool:g_bStrafe [33];
public plugin_init () {
register_clcmd ( "+strafe" , "cmdCheckStrafeON" );
register_clcmd ( "-strafe" , "cmdCheckStrafeOFF" );
}
public cmdCheckStrafeON ( id ) {
g_bStrafe [id] = true;
}
public cmdCheckStrafeOFF ( id ) {
g_bStrafe [id] = false;
}
This doesn't work. Too, default +strafe bind is ALT. So i tried check, if IN_ALT1
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
public plugin_init () {
register_forward( FM_CmdStart, "fwCmdStart");
}
public fwCmdStart ( id, uc_handle) {
new iButton = get_uc ( uc_handle, UC_Buttons );
if ( iButton & IN_ALT1 )
client_print ( id , print_chat , "You are using ALT bind!" );
return FMRES_IGNORED;
}
Still, doesn't work.
Any help?