malyczolg
27th July 2013, 22:51
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 :
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
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 == 1 && 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 == 1 && 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");
}
}
case "1_killstreak":
if(self.ks1==1)
{
if(self.ksczolg1==0 && 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
why my menu is not auto update ?
i must leave menu and open again
how fix it?
menu :
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
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 == 1 && 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 == 1 && 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");
}
}
case "1_killstreak":
if(self.ks1==1)
{
if(self.ksczolg1==0 && 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