Trying it with playermodels now
SNIPPET
Code:
if(menu == "huntmodel")
{
if(response == "menuopen")
{
self setclientcvar("dvar_yourhelmet", self.helmet);
self setclientcvar("dvar_yourbody", self.body);
self setclientcvar("dvar_yourhead", self.head);
}
if(response == "playerbody_american_normandy01")
{
self.body= response;
self setclientcvar("dvar_yourbody", self.body);
self closeMenu();
self closeInGameMenu();
self iprintlnbold("body:"+response);
}
It does show the right dvars when I open it. However, when I click on the first model with response "playerbody_american_normandy01" nothing happens.
huntmodel.menu
Code:
itemDef
{
name "body"
visible 1
rect 0 0 70 22
origin ORIGIN_CHOICE5
forecolor GLOBAL_UNFOCUSED_COLOR
type ITEM_TYPE_BUTTON
text "^7Normandy ^31"
textfont UI_FONT_NORMAL
textscale .30
textstyle ITEM_TEXTSTYLE_SHADOWED
textaligny 20
dvartest "language"
showDvar { "1" }
action
{
play "mouse_click";
scriptMenuResponse "playerbody_american_normandy01";
}
onFocus
{
play "mouse_over";
}
}