Hello, this is part of the code for my menu, once this part of the menu is called, i want the variables in the menu to be saved, onto the menu keys, and onto the next menu, and so forth...
I want the "Mage,SelectedPlayers,PlayerSelecter,ExpG od" To be saved onto the keys and following menus that are called instead of just the regular (id,keys)
This is my attempt at doing that....
Code:
register_menucmd(register_menuid("ExpMenu:"),1023,"ExpMenu1Function")
public ExpMenu1(Mage,SelectedPlayers,PlayerSelecter,ExpGod)
{
new exp[32], exp1[32], exp2[32], exp3[32]
get_euser_exp(mage,exp,31)
get_euser_exp(SelectedPlayers,exp1,31)
get_euser_exp(PlayerSelecter,exp2,31)
get_euser_exp(ExpGod,exp3,31)
client_print(menuuser,print_center,"%s|%s|%s|%s|",exp,exp1,exp2,exp3)
new menuBodyp[512]
new len = format(menuBodyp,511,"ExpMenu:^n^nMenu Info^n",name,name1)
len += format(menuBodyp[len],511-len,"1. More Info^n2. Exp God Info^n^n0. Exit")
show_menu(Mage,SelectedPlayers,PlayerSelecter,ExpGod,((1<<0)|(1<<1)|(1<<9)),menuBodyp)
return PLUGIN_HANDLED
}
public ExpMenu1Function(Mage,SelectedPlayers,PlayerSelecter,ExpGod,key)
{
switch(key)
{
case 0:
{
ExpMenu1MoreInfo(Mage,SelectedPlayers,PlayerSelecter,ExpGod)
}
case 1:
{
ExpMenu1ExpGod(Mage,SelectedPlayers,PlayerSelecter,ExpGod)
}
case 9:
{
return PLUGIN_HANDLED
}
}
return PLUGIN_HANDLED
}
But it gives me an argument error at the "show_menu" line when I compile
So my questions is how, do I save multiple variables in the menus?
Edit:
Hmm more explaining...
I want only the person who pressed the menu to see the menu(playerselecter), but i want the other 3 player variables (mage, expgod, selectedplayers) to be saved as well..
So that in the next menus i can also do things like get_user_authid, get_euser_exp, get_euser_level, etc on the variables! Thanks!