Quote:
Originally Posted by HamletEagle
PHP Code:
#include <amxmodx> #include <engine>
new g_bBhop[ 33 ]
public plugin_init() { register_clcmd("say /enablebhop","EnableCommand") register_clcmd("say /disablebhop","DisableCommand") }
public EnableCommand(id) { g_bBhop[ id ] = true }
public DisableCommand(id) { g_bBhop[ id ] = false }
public client_PreThink(id) { if(is_user_alive(id)) { if(g_bBhop [ id ] && get_user_flags(id) & ADMIN_IMMUNITY) { new oldbuttons = get_user_oldbutton(id); oldbuttons &= ~IN_JUMP; entity_set_int(id, EV_INT_oldbuttons, oldbuttons); } } }
|
Hamlet I Edit Your code And I have one Warning.
here is the code:
PHP Code:
#include <amxmodx>
#include <engine>
new g_bBhop[ 33 ]
new szName[ 33 ]
public plugin_init()
{
register_clcmd("say /enablebhop","EnableCommand")
register_clcmd("say /disablebhop","DisableCommand")
}
public EnableCommand(id)
{
g_bBhop[ id ] = true
get_user_name(id, szName, charsmax(szName))
client_print(id, print_chat, "%s U Enabled Bhop", szName)
}
public DisableCommand(id)
{
g_bBhop[ id ] = false
get_user_name(id, szName, charsmax(szName))
client_print(id, print_chat, "%s U Disabled Bhop", szName)
}
public client_PreThink(id)
{
if(is_user_alive(id))
{
if(g_bBhop [ id ] && get_user_flags(id) & ADMIN_IMMUNITY)
{
client_print(id, print_chat, "This Command Only For Admins")
new oldbuttons = get_user_oldbutton(id);
oldbuttons &= ~IN_JUMP;
entity_set_int(id, EV_INT_oldbuttons, oldbuttons);
}
}
}