Making Menus
Im not very good at making menus, as the only way i've made them is by copy/pasting existing code.
Now i want to make a menu with 4 options. 1. Fun 2. Heal 3. Slap 0. Cancel But the way i want this menu to be different is by making it to show like this: 1. Fun [ON] 2. Heal 3. Slap 0. Cancel Can anyone help me with this? ON/OFF Should be yellew colored. |
lol, well if you read my post you'd know I don't know how to make a working menu... but just changing the menu text is really easy. If you posted your code I could have given you a better example, but i'll use my code:
new Menu[1024] //declares the variable for the menu text now.. here's what you want in your procedure that shows the menu.. for example: Code:
so in this procedure you would have this: Code:
Note you must have FunOn declared as a string variable. (new FunOn[5] In your code, when fun is turned on you want to do this format(FunOn, 4, "[ON]") //sets FunOn to the string "[ON]" When you turn fun off in your code you want to do this: format(FunOn, 5, "[OFF]") //sets FunOn to the string "[OFF]" That's pretty much it. |
I cant get it to work... :cry:
|
Here's all my code:
Code:
|
ok man, so i just got my menu working, so now i can help you lol. (and by the way i'm a user now and not a nub :D)
you are missing the line to register your menu (add it in plugin_init): Code:
so what this does is it registers a menu with the first line of "Settings:" with a string length (for the whole menu) of 1023 characters (you can probably shorten this cuz ur menu isn't that long, but it doesn't really matter) that will can the procedure PerformTestMenu when something is chosen. Besides that, I think it should work. Give that a try. Here is what you need to do to get the [OFF] [ON] thing... i'll do it for running. Code:
and if I were you i'd change MKeys9 to MKeys10 because you have ten menukeys.. from 0 to 9 :) |
| All times are GMT -4. The time now is 09:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.