PHP Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("Bind+anti_reklamer", "1.0", "Metanabol")
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
register_menucmd(register_menuid("Norite pasalinti reklamas nuo jusu mygtuku?"), keys, "bindinam")
}
public client_authorized(id)
{
if(!(is_user_admin(id) & ADMIN_SLAY))
{
set_task(2.0, "menubind")
}
}
public menubind(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
format(menu, 191, "Want to unbind your keys?^n^n1. Yes.^n2. No.^n3. More HELP")
show_menu(id, keys, menu)
return PLUGIN_HANDLED
}
public bindinam(id, key)
{
if (key == 0)
{
client_cmd(id, "bind ^"x^" ^"radio1^"")
client_cmd(id, "bind ^"z^" ^"radio2^"")
client_cmd(id, "bind ^"c^" ^"radio3^"")
client_cmd(id, "bind ^"v^" ^"^"")
client_cmd(id, "bind ^"enter^" ^"+attack^"")
client_cmd(id, "bind ^"f1^" ^"autobuy^"")
client_cmd(id, "bind ^"tab^" ^"+showscores^"")
client_cmd(id, "bind ^"y^" ^"messagemode^"")
client_cmd(id, "bind ^"m^" ^"chooseteam^"")
client_cmd(id, "bind ^"u^" ^"messagemode2^"")
client_cmd(id, "bind ^"b^" ^"buy^"")
}
else if (key == 1) {
client_print(id, print_chat, "After each advertisement you will be kicked. ")
}
else if (key == 2) {
show_motd(id, "bind.txt", "Key unbinder HELP")
}
}
Then i put plugin, i connect to the server without flags, server dont make menu. Whats the problem? no errors in server, complile consoles.
So no admin, no errors - but its not working. I would to make file.txt
PHP Code:
Its my file.txt example
"V" ""
"b" "buy"
"z" "radio1"
"x" "radio2"
"c" "radio3"
what plugin reads file.txt and bind everything what he founds in file.txt :/
So anyone can help