AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with an menu. (https://forums.alliedmods.net/showthread.php?t=61301)

BalkY 09-26-2007 10:42

Help with an menu.
 
Hi, i have this menu
public simple_menu(id, level, cid) {
if( !cmd_access(id, level, cid, 1)) {
return PLUGIN_HANDLED
}

show_simple_menu( id, 0 )

return PLUGIN_HANDLED
}
public show_simple_menu( id, pos ) {
if( pos < 0 )
return

new menuBody[512]
new keys = (1<<9)
new key = 0

new len = format(menuBody,511, "%s", "\ySimple Menu\R^n\w^n" )

keys |= (1<<key)
key++
len += format(menuBody[len],511-len,"%d. ^n\w", key)

keys |= (1<<key)
key++
len += format(menuBody[len],511-len,"%d. ^n\w", key)


len += format(menuBody[len],511-len,"0. Quit menu")

show_menu( id, keys, menuBody )
}
public simple_menua( id,key ) {
switch( key ) {
case 0: {
}
case 1: {
}
return PLUGIN_HANDLED
}
}

How can i get from there two buttons one result?
Like when i press one its save a var like: one = hi
when i press two: two = there
so i want to show me hi there like one result
i hope you undarstand me :wink:


All times are GMT -4. The time now is 16:07.

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