 |
|
Senior Member
Join Date: Jun 2014
Location: israel
|

07-29-2014
, 15:04
Re: Problem on my plugin
|
#6
|
Quote:
Originally Posted by MrKiller2010
here:
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) { if(!(get_user_flags(id) & ADMIN_IMMUNITY)) { client_print(id, print_chat, "This Command Only For Admins") return PLUGIN_HANDLED } g_bBhop[ id ] = true get_user_name(id, szName, charsmax(szName)) client_print(id, print_chat, "%s U Enabled Bhop", szName) return PLUGIN_HANDLED }
public DisableCommand(id) { if(!(get_user_flags(id) & ADMIN_IMMUNITY)) { client_print(id, print_chat, "This Command Only For Admins") return PLUGIN_HANDLED } g_bBhop[ id ] = false get_user_name(id, szName, charsmax(szName)) client_print(id, print_chat, "%s U Disabled Bhop", szName) return PLUGIN_HANDLED }
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); } } }
|
when i type /enablebhop or /disablebhop i not see any message..
|
|
|
|