Results 1 to 3 of 3

Thread: .menu autoupdate

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    .menu autoupdate

    hello, I have a problem with the menu.
    why my menu is not auto update ?
    i must leave menu and open again
    how fix it?

    menu :
    PHP Code:
    itemDef 
            
    {
                
    name            "button_killstreak1"
                
    visible            1
                rect            0 0 140 24
                origin            ORIGIN_BUTTON_KILLSTREAK1
                forecolor        GLOBAL_UNFOCUSED_COLOR
                type            ITEM_TYPE_BUTTON
                text            
    "^6*^710 Kil^9ls: ^83 ^7Grenades          ^2100$"
                
    textfont        UI_FONT_NORMAL
                textscale        .3
                textstyle        ITEM_TEXTSTYLE_SHADOWED
                textaligny        20
                action
                
    {
                    
    play "mouse_click";
                    
    scriptMenuResponse "1_killstreak";
                    
    scriptMenuResponse "refreshks1";
                }
                
    onFocus
                
    {    
                    
    play "mouse_over";
                }
            }

            
    itemDef
            
    {
                
    name            "ks1_accept"
                
    visible         0
                rect            0 6 20 20
                origin            ORIGIN_KS1_ACCEPT
                 style            WINDOW_STYLE_SHADER
                background        
    "czolg_accept"
                
    dvartest        "ui_allow_ks1_accept"
                
    showDvar        "1" }
                
    decoration
            
    }
            
    itemDef
            
    {
                
    name            "ks1_lock"
                
    visible         0
                rect            0 6 20 20
                origin            ORIGIN_KS1_LOCK
                 style            WINDOW_STYLE_SHADER
                background        
    "czolg_lock"
                
    dvartest        "ui_allow_ks1_lock"
                
    showDvar        "1" }
                
    decoration
            
    }
            
    itemDef
            
    {
                
    name            "ks1_unlock"
                
    visible         0
                rect            0 6 20 20
                origin            ORIGIN_KS1_UNLOCK
                 style            WINDOW_STYLE_SHADER
                background        
    "czolg_unlock"
                
    dvartest        "ui_allow_ks1_unlock"
                
    showDvar        "1" }
                
    decoration
            

    zommenus.gsc

    PHP Code:
            if(response == "refreshks1")
            {
                if(
    self.ks1==0)
                {
                
    wait 1;
                
    self setClientCvar("ui_allow_ks1_accept","0");
                
    self setClientCvar("ui_allow_ks1_unlock","0");
                
    self setClientCvar("ui_allow_ks1_lock","1");
                }
                else if(
    self.ks1 == && self.ksczolg1 == 0)
                {
                
    wait 1;
                
    self setClientCvar("ui_allow_ks1_accept","0");
                
    self setClientCvar("ui_allow_ks1_unlock","1");
                
    self setClientCvar("ui_allow_ks1_lock","0");
                }
                else if(
    self.ks1 == && self.ksczolg1 == 1)
                {
                
    wait 1;
                
    self setClientCvar("ui_allow_ks1_accept","1");
                
    self setClientCvar("ui_allow_ks1_unlock","0");
                
    self setClientCvar("ui_allow_ks1_lock","0");
                }
            } 
    PHP Code:
        case "1_killstreak":    
        if(
    self.ks1==1)
        {
            if(
    self.ksczolg1==&& self.awards >= 1)
            {
                
    self.awards-=1;
                
    self.ksczolg1=1;
            }
            else if(
    self.ksczolg1==1)
            {
                
    self.awards+=1;
                
    self.ksczolg1=0;
            }
            else if(
    self.awards 1)
            {
                
    wait 0.1;
                
    self setClientCvar("ui_killstreak_message","^2~>^7Yo^9u ^7Have^9n't ^7Mo^9re ^7Awa^9rds^2*");
            }
        }
        else if(
    self.money >= 100 && self.awards >= 1)
        {
            
    self.awards-=1;
            
    self.ks1=1;
            
    self.ksczolg1=1;
            break;
            
        }
        break; 
    #####
    Please move topic to the department: moding
    Last edited by malyczolg; 27th July 2013 at 22:00.

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    of those 2 scriptmenuresponses, one gets blocked by the engine for it is too fast after the first.
    Use the first one as an update also.

  3. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (28th July 2013)

  4. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    thanks IzNoGoD , work

Posting Permissions

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