Raised This Month: $ Target: $400
 0% 

Plz help whit menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
exelz
Member
Join Date: Oct 2006
Old 02-20-2007 , 03:06   Plz help whit menu
Reply With Quote #1

can some one post a easy menu link on code.
I need to make a menu:
1.Armors
Opens:
1.Steel armor
2.Iron Armor
2.Weapons
Opens:
1.Steel Dagger
2.Iron Dagger

PLZ HELP!
__________________
exelz is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-20-2007 , 10:27   Re: Plz help whit menu
Reply With Quote #2

MAN, is this your 50th thread?
Put it into one.

Look at other plugins, this is not the topic to get the code. This is where you post a code and someone can find problems with that. You don't even have a start for a code, this should be in suggestions or i suggest you learn how to code.
[ --<-@ ] Black Rose is offline
Old 02-20-2007, 16:02
Squallkins
This message has been deleted by Squallkins.
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 02-20-2007 , 16:14   Re: Plz help whit menu
Reply With Quote #4

something like this perhaps:

Code:
//define includes and keys

#include <amxmodx>
#define MENUTIME 60
#define KEY1 (1<<0)
#define KEY2 (1<<1)
#define KEY3 (1<<2)
#define KEY4 (1<<3)
#define KEY5 (1<<4)
#define KEY6 (1<<5)
#define KEY7 (1<<6)
#define KEY8 (1<<7)
#define KEY9 (1<<8)
#define KEY0 (1<<9)

// Register Menu IDs
	new menu1ID = register_menuid("menu1");
	new menu2ID = register_menuid("menu2");
	new menu3ID = register_menuid("menu3");
		
// Register Menu Commands
	register_menucmd(menu1ID,1023,"menu1Action");
	register_menucmd(menu2ID,1023,"menu2Action");
	register_menucmd(menu3ID,1023,"menu3Action");



public plugin_init() {

//do the usual here

}


//Main menu display

public MainMenuDisplay(id) {
	new menubody[256];
	format(menubody,255,"\yExelz Armour Menu:^n^n");
	add(menubody,255,"\w1. Armours^n");
	add(menubody,255,"\w2. Weapons^n");
	add(menubody,255,"\w^n0. Exit");
	
	
	show_menu(id,KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY0,menubody,MENUTIME,"menu1");
	
	return PLUGIN_HANDLED;
}

//armours menu section

public ArmourMenuDisplay(id) {
	new menubody[256];
	format(menubody,255,"\yExelz Armour Menu:^n^n");
	add(menubody,255,"\w1. Steel Armour^n");
	add(menubody,255,"\w2. Iron Armour^n");
             add(menubody,255,"\w3. Main Menu^n");
             add(menubody,255,"\w^n0. Exit");
	
	
	show_menu(id,KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY0,menubody,MENUTIME,"menu2");
	
	return PLUGIN_HANDLED;
}

//weapons  menu section

public ArmourMenuDisplay(id) {
	new menubody[256];
	format(menubody,255,"\yExelz Armour/Weapon Menu:^n^n");
	add(menubody,255,"\w1. Steel Dagger^n");
	add(menubody,255,"\w2. Iron Dagger^n");
             add(menubody,255,"\w3. Main Menu^n");
             add(menubody,255,"\w^n0. Exit");
	
	
	show_menu(id,KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY0,menubody,MENUTIME,"menu3");
	
	return PLUGIN_HANDLED;
}



public menu1Action(id,key) {
	
		if(key == 0) {
//do something here

	}


		if(key == 1) {
//do something here

	}
//do for all keys

}


public menu2Action(id,key) {
	
		if(key == 0) {

//do something here
			}

//do for all keys

}


public menu3Action(id,key) {
	
		if(key == 0) {

//do something here
			}

//do for all keys

}

i missed some bits that u need to put in, other than that the menu part is complete
Squallkins is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 02-20-2007 , 16:18   Re: Plz help whit menu
Reply With Quote #5

http://forums.alliedmods.net/showthr...highlight=menu
or
Menu Tutorial

Search Next time.
__________________
i stop around here and there.
Da_sk8rboy 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:37.


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