Raised This Month: $ Target: $400
 0% 

Autobind


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kamild1996
Senior Member
Join Date: May 2011
Old 10-01-2011 , 18:21   Autobind
Reply With Quote #1

Hi.
I want to add an auto-bind - when somebody joins the server, /menu is automatically binded to V key.
Quote:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Menu serwera"
#define VERSION "1.0"
#define AUTHOR "Redux"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /menu","mymenu");
}
public mymenu(id)
{
new MyMenu=menu_create("\wMenu serwera [\rDeathrun\w]","cbMyMenu");

menu_additem(MyMenu,"Zmien serwer");//item=0
menu_additem(MyMenu,"Sklep DR");//item=1
menu_additem(MyMenu,"Wylacz widocznosc CT");//item=2
menu_additem(MyMenu,"Punkty");//item=3
menu_additem(MyMenu,"Menu Admina");//item=4
menu_additem(MyMenu,"Wylacz/wlacz RS");//item=5

menu_setprop(MyMenu,MPROP_EXITNAME,"Wyjscie") ;
menu_setprop(MyMenu,MPROP_EXIT,MEXIT_ALL);
menu_setprop(MyMenu,MPROP_NUMBER_COLOR,"\y");


menu_display(id, MyMenu,0);
return PLUGIN_HANDLED;
}
public cbMyMenu(id, menu, item)
{
switch(item)
{
case 0:
{
client_cmd(id, "say /serwer");

}
case 1:
{
client_cmd(id, "say /drshop");

}
case 2:
{
client_cmd(id, "say /invis");

}
case 3:
{
client_cmd(id, "say /mypoints");

}
case 4:
{
client_cmd(id, "amxmodmenu");

}
case 5:
{
client_cmd(id, "say /roundsound");

}

}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
Can you help me to add this to this plugin?
kamild1996 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode