Raised This Month: $ Target: $400
 0% 

How to link say commands to menus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
31m0_owns
Member
Join Date: May 2008
Location: SLH, New Jersey-- U.S.A
Old 03-03-2009 , 08:16   How to link say commands to menus
Reply With Quote #1

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwhich>
#define PLUGIN "elmos"
#define VERSION "1.0"
#define AUTHOR 31m0"
#define KeysItem Menu (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4) // Keys: 12345

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /itemmenu","Give Item",ADMIN_ALL, "Gives someone and item")
register_menucmd(register_menuid("Item Menu"), KeysItem Menu, "PressedItem Menu")


}
public ShowItem Menu(id) {
show_menu(id, KeysItem Menu, "\r1. G\wrenade^n\r2. S\wmoke^n\r3. F\wlash^n\r4. M\w4^n\r5. A\wK^n", -1, "Item Menu") // Display menu
}
public PressedItem Menu(id, key) {
/* Menu:
* 1. Grenade
* 2. Smoke
* 3. Flash
* 4. M4
* 5. AK
*/
switch (key) {
case 0: { // 1

}
case 1: { // 2

}
case 2: { // 3

}
case 3: { // 4

}
case 4: { // 5

}
}
}
__________________
Project(s):
Prop-Hunt: 5%
Killcam: NEVER GOING TO HAPPEN!!!
31m0_owns 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 17:03.


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