Raised This Month: $51 Target: $400
 12% 

How to link say commands to menus


Post New Thread Reply   
 
Thread Tools Display Modes
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
rufee
Junior Member
Join Date: Aug 2008
Location: Lithuania
Old 03-03-2009 , 08:28   Re: How to link say commands to menus
Reply With Quote #2

if i understood what you want
PHP Code:
/* 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(PLUGINVERSIONAUTHOR)
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(idKeysItem 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(idkey) {
/* Menu:
* 1. Grenade
* 2. Smoke
* 3. Flash
* 4. M4
* 5. AK
*/
switch (key) {
case 
0: { client_print(0,print_chat,"Your text"player_name)
 
}
case 
1: { client_print(0,print_chat,"Your text"player_name)
 
}
case 
2: { client_print(0,print_chat,"Your text"player_name)
 
}
case 
3: { client_print(0,print_chat,"Your text"player_name)
 
}
case 
4: { client_print(0,print_chat,"Your text"player_name)
 
}
}

rufee is offline
31m0_owns
Member
Join Date: May 2008
Location: SLH, New Jersey-- U.S.A
Old 03-03-2009 , 15:42   Re: How to link say commands to menus
Reply With Quote #3

I think the code works... but when i compile it says cannot not read from file hamsandwhich
__________________
Project(s):
Prop-Hunt: 5%
Killcam: NEVER GOING TO HAPPEN!!!
31m0_owns is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 03-03-2009 , 18:34   Re: How to link say commands to menus
Reply With Quote #4

you dont have hamsandwich.inc in your include folder
Attached Files
File Type: inc hamsandwich.inc (13.0 KB, 120 views)
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 03-03-2009 , 18:35   Re: How to link say commands to menus
Reply With Quote #5

.....

#include <hamsandwhich>

-->

#include <hamsandwich>
__________________
IneedHelp is offline
Reply



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 00:18.


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