Posts: 49
Threads: 7
Joined: Feb 2014
Hi All!
I was trying to make a whois menu for AC and so far it is working
But my question is, what do I do to replace the CN,s with the names of the players?
they don't have to be in cn order or anything just as long as their names are there.
If you can help at all thank you.
Posts: 1,438
Threads: 54
Joined: Jun 2010
AFAIK you cannot do this, I tried at one point. The reasoning might be in the script thread somewhere but Bukz or V-Man advised it couldn't be done.
Posts: 1,033
Threads: 85
Joined: Oct 2013
Posts: 729
Threads: 16
Joined: Dec 2012
I don't believe that works in a menu Mousikos. I remember trying, it failed and a couple people on IRC said it wasn't possible.
Posts: 49
Threads: 7
Joined: Feb 2014
Alright thanks DrauL
Yes music I tried that, wouldn't work. Thanks though :-)
Unless I did it wrong of course, this is my first experience with cube script.
Posts: 101
Threads: 2
Joined: Sep 2011
(04 Jan 15, 04:26AM)foa.trionkali Wrote: Alright thanks DrauL
Yes music I tried that, wouldn't work. Thanks though :-)
Unless I did it wrong of course, this is my first experience with cube script.
It can be done, but you must keep present that the menus are static so you cant change the text on it.
You must destroy the menu and then create it again.
alias create_whoismenu [
delmenu player_list
newmenu player_list
loop i (+ (highestcn) 1) [
if (isclient $i) [
menuitem (concatword (c 3) (player $i name)) (format "whois %1" $i)
]
]
]
bind KEY [ create_whoismenu; showmenu player_list ]
Posts: 756
Threads: 53
Joined: Nov 2011
Indeed, you would need to create the menu every time you access it as the content is generated once and remains static after that.
Posts: 49
Threads: 7
Joined: Feb 2014
Alright thanks guys! I will try when I get back home. Am out of town for the week.
Thanks for all your help! :D
Posts: 444
Threads: 31
Joined: Mar 2011
Awesome, Pablo. It works! :D
Posts: 49
Threads: 7
Joined: Feb 2014
It does work I was able to complete my admin script with it. You are a pro man!
Thanks You Jpablon.
And to all of you who answered.
Posts: 1
Threads: 0
Joined: Jan 2015
It's awesome, guy's. It works:)