Results 1 to 4 of 4

Thread: Showing values in .menu files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Quote Originally Posted by voron00 View Post
    PHP Code:
    self setClientCvar("ui_stats_kills"self.kills); 
    And then use this cvar in your menus, just look how its done in serverinfo menus ( I would have given you an example code but i only will be home tomorrow ).
    Quote Originally Posted by IzNoGoD View Post
    Replace the text part of an itemdef with cvar/dvar (not sure which one, try both), with value [the dvar you want to show], like:
    PHP Code:
    dvar cl_showthisdvarplox 
    It works!

    I set various itemDefs with various dvars and then used those dvars in the setclientcvar func

    PHP Code:
    itemDef
            
    {
                
    name            "stats_headshots"
                
    group            ingamebox
                visible            1
                rect            60 68 0 0
                origin            ORIGIN_QUICKMESSAGEWINDOW
                dvar             
    "ui_stats_headshots"
                
    forecolor        0 1 0 1
                textfont        UI_FONT_NORMAL
                textscale        .24
                textaligny        8
                decoration
            

    and in .gsc, as you guys said:

    PHP Code:
    self setclientcvar("ui_stats_headshots"headshots
    Thanks a lot!!
    Last edited by pollo; 9th May 2016 at 21:53.

Posting Permissions

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