Help with a script please!
#1
Hi All!

I was trying to make a whois menu for AC and so far it is working 
[Image: 4.jpg] 
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.
Thanks given by:
#2
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.
Thanks given by:
#3
http://assault.cubers.net/docs/reference...ier_findpn
Thanks given by:
#4
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.
Thanks given by:
#5
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.
Thanks given by:
#6
(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 ]
Thanks given by:
#7
Indeed, you would need to create the menu every time you access it as the content is generated once and remains static after that.
Thanks given by:
#8
Alright thanks guys! I will try when I get back home. Am out of town for the week.

Thanks for all your help! :D
Thanks given by:
#9
Awesome, Pablo. It works! :D
Thanks given by:
#10
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.
Thanks given by:
#11
It's awesome, guy's. It works:)
Thanks given by: