Raised This Month: $ Target: $400
 0% 

Making Menus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-21-2005 , 21:22  
Reply With Quote #5

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 )

you are missing the line to register your menu (add it in plugin_init):

Code:
register_menucmd(register_menuid("Settings:"), 1023, "PerformTestMenu")


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:
public ShowTestMenu(id) {     //create a boolean var for [on] [off] (note: this would be unnecessary if i knew how to compare a string)     new Running = 0 //assumes no as default     //create a new var for [ON] [OFF]     new strRunning[6]         if(Running)         format(strRunning, 5, "[ON]")     else         format(strRunning, 5, "[OFF]")     format(MyTestMenu, 1023, "Settings:^n^n1. Heal Yourself^n2. Silent Run %s^n3.Get Money^n4. Teleport to mouse point^n^n0. Cancel", strRunning)     show_menu(id, MKeys9, MyTestMenu) }

and if I were you i'd change MKeys9 to MKeys10 because you have ten menukeys.. from 0 to 9
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
 



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 09:50.


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