Results 1 to 4 of 4

Thread: huddraw ?

  1. #1

    Default huddraw ?

    hello all

    i wonder to add my clan name on the screen like the sig of the foresight but i didnt know how to make this run singly. i am using this auto team balancer http://www.modtheater.com/threads/au...alancer.27467/ then i found it using HUDDRAW so i tried to put my clan name using this script. here is the code that are used:

    Code:
    update_hud local.allies local.axis:
    
      //HEADER
      huddraw_virtualsize 101 1
      huddraw_align  101 right top
      huddraw_font   101 "verdana-12"
      huddraw_rect   101 -72 98 14 14
      huddraw_color  101 0 1 0
      huddraw_alpha  101 1.0
      huddraw_string 101 "=TEAMS="
    
      //ALLIES PLAYERS
      huddraw_virtualsize 102 1
      huddraw_shader 102 ("textures/hud/allies")
      huddraw_align  102 right top
      huddraw_rect   102 -60 118 12 12
      huddraw_alpha  102 1.0
    
      huddraw_virtualsize 103 1
      huddraw_align  103 right top
      huddraw_font   103 "verdana-12"
      huddraw_rect   103 -58 134 14 14
      huddraw_color  103 0 1 0
      huddraw_alpha  103 1.0
      huddraw_string 103 (local.allies)
    
      //AXIS PLAYERS
      huddraw_virtualsize 104 1
      huddraw_shader 104 ("textures/hud/axis")
      huddraw_align  104 right top
      huddraw_rect   104 -42 118 12 12
      huddraw_alpha  104 1.0
    
      huddraw_virtualsize 105 1
      huddraw_align  105 right top
      huddraw_font   105 "verdana-12"
      huddraw_rect   105 -40 134 14 14
      huddraw_color  105 0 1 0
      huddraw_alpha  105 1.0
      huddraw_string 105 (local.axis)
    
      huddraw_font 233 "courier-20"
      huddraw_alpha 233 0.8
      huddraw_color 233 1 0 0
      huddraw_align 233 left bottom
      huddraw_rect 233 420 -20 100 16
      huddraw_string 233 "my clan name"
    my questions: 1-this can make CGM buffer overflow that cuz lagg ?? cuz people on the server is keep saying that the server lag
    2-how to make a HUDdraw massage in a separated script ??

  2. #2

    Default

    answer to question 2:

    Code:
    update_hud local.allies local.axis:
      huddraw_string 103 (local.allies)
      huddraw_string 105 (local.axis)
    Only update the string. Therefor the huddraw itself does not have to be redrawn the whole time. This does mean that it will not show up right away for new users so you have to make a separate thread that you only run every minute or even longer, which contains:

    Code:
      //HEADER
      huddraw_virtualsize 101 1
      huddraw_align  101 right top
      huddraw_font   101 "verdana-12"
      huddraw_rect   101 -72 98 14 14
      huddraw_color  101 0 1 0
      huddraw_alpha  101 1.0
      huddraw_string 101 "=TEAMS="
    
      //ALLIES PLAYERS
      huddraw_virtualsize 102 1
      huddraw_shader 102 ("textures/hud/allies")
      huddraw_align  102 right top
      huddraw_rect   102 -60 118 12 12
      huddraw_alpha  102 1.0
    
      huddraw_virtualsize 103 1
      huddraw_align  103 right top
      huddraw_font   103 "verdana-12"
      huddraw_rect   103 -58 134 14 14
      huddraw_color  103 0 1 0
      huddraw_alpha  103 1.0
      huddraw_string 103 (local.allies)
    
      //AXIS PLAYERS
      huddraw_virtualsize 104 1
      huddraw_shader 104 ("textures/hud/axis")
      huddraw_align  104 right top
      huddraw_rect   104 -42 118 12 12
      huddraw_alpha  104 1.0
    
      huddraw_virtualsize 105 1
      huddraw_align  105 right top
      huddraw_font   105 "verdana-12"
      huddraw_rect   105 -40 134 14 14
      huddraw_color  105 0 1 0
      huddraw_alpha  105 1.0
      huddraw_string 105 (local.axis)
    
      huddraw_font 233 "courier-20"
      huddraw_alpha 233 0.8
      huddraw_color 233 1 0 0
      huddraw_align 233 left bottom
      huddraw_rect 233 420 -20 100 16
      huddraw_string 233 "my clan name"

    I think that already could help you a bit ...
    :)

  3. #3

    Default

    possimos i didnt get ur point sry it's from me any other help ??

    and here is the post armagedon.

  4. #4

    Default

    This will only update the huds whenever the number of players on a team have changed instead of every second: (this may help eliminate some CGM Buffer overflow)

    Find this:
    PHP Code:
        local.teamshud int(getcvar("urm_tb_teamshud"))
        if(
    local.teamshud) {
          
    //Display/Update the teams HUD.
          
    waitthread update_hud local.allies local.axis
        


    Replace with this:
    PHP Code:
        local.teamshud int(getcvar("urm_tb_teamshud"))
        if(
    local.teamshud)
        {
            if(
    level.teamsetup
            {
                if(
    level.axis != local.axis || level.allies != local.allies)
                {
                    
    //Display/Update the teams HUD.
                    
    waitthread update_hud local.allies local.axis
                    
                    level
    .axis local.axis
                    level
    .allies local.allies
                
    }
            }
            else
            {
                
    level.teamsetup 1
                level
    .axis 0
                level
    .allies 0
            
    }
        } 

    As far as your team hud display, what you have there is fine. Just put it into the update_hud local.allies local.axis: thread

Posting Permissions

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