Results 1 to 10 of 46

Thread: name , client id in menu

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Ni3ls View Post
    That still doesnt work for me:/ I already left it out.
    Maybe i place this at the wrong part
    PHP Code:
        players getEntArray"player""classname" ); 
        for( 
    i=0players.sizei++ ) 
        { 
            
    player players[i]; 
             
            if( 
    player getEntityNumber() == 
            { 
                
    player setClientCvar"ui_player_name_" iplayer.name ); 
                
    player setClientCvar"ui_player_entNum_" i); 
            } 
        } 
    Where am I supposed to thread this?
    Well, in the 2 examples above, the dvar is set after a scriptmenuresponse. So, that would be anywhere you are monitoring for menu response (eg maps\mp\gametypes\_menus.gsc, but obviously any file where you have a script varible waiting for a menu and response). So, if your action{} item is a scriptmenuresponse, using a loop to find all players is pretty redundant as you already have the entity defined - it would be the player making the menu response.

    Perhaps the best thing you can do is modding elementary - post your menu code and your menu response waiter script in full. That way we can see if we can spot any problems in the code.

    ADDENDUM -

    I would just point out that I've never had a problem showing a dvar value in a menu itemDef{}. My problem had always been when doing that with an action{} item as well. As I posted above, I just discovered what my problem had been - I was always including decoration as well in the item definition. If you leave it out, showing the value of a dvar works every time with an action{} item.
    Last edited by Tally; 29th May 2013 at 10:35.

  2. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (29th May 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •