This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

How to pass a information from a menu to another?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RawArkanis
New Member
Join Date: Jan 2012
Old 01-17-2012 , 13:25   How to pass a information from a menu to another?
Reply With Quote #1

Hello, my first post here. =)

Well, I have a menu where I select a player and another that I select a effect. I need to give the player id from the frist menu handler to the second. the following, menu handlers to apply the effect on the player.
So, I need to know if there is a way to make it "easy/right" or I just need to store it on a global variable?

Thx, in advance.
RawArkanis is offline
DarkGL
Senior Member
Join Date: Aug 2010
Location: Warsaw, Poland
Old 01-17-2012 , 16:01   Re: How to pass a information from a menu to another?
Reply With Quote #2

or store it in an info parametr at menu_additem and get value of info with menu_item_getinfo at menu handle function
Example:
Code:
menu_additem(menu,"handle","13")

new data[6], iName[64]
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
	new key = str_to_num(data)
key will be 13
__________________
DarkGL is offline
RawArkanis
New Member
Join Date: Jan 2012
Old 01-18-2012 , 06:41   Re: How to pass a information from a menu to another?
Reply With Quote #3

This simplifies everything.
Thx.
RawArkanis 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 11:21.


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