Question [help]Printing GetDvar value to screen

Ducks

Veteran
Messages
24
Reaction score
16
Points
793
I'm trying to print a dvar value to screen. Would i need to define as variable if so how would i do so. The dvar value changes depending on the level.

level.alliesHud = createServerFontString("default", 1);
level.alliesHud setPoint("CENTER", "TOP", 0,0);
level.alliesHud.label = (GetDvarInt("g_TeamName_axis"));
level.alliesHud.hideWhenInMenu = true;
 

CF4_99

Veteran
Messages
145
Reaction score
56
Points
888
I'm trying to print a dvar value to screen. Would i need to define as variable if so how would i do so. The dvar value changes depending on the level.

level.alliesHud = createServerFontString("default", 1);
level.alliesHud setPoint("CENTER", "TOP", 0,0);
level.alliesHud.label = (GetDvarInt("g_TeamName_axis"));
level.alliesHud.hideWhenInMenu = true;
You're trying to use GetDvarInt on a dvar with a string value, so it won't return anything. Change GetDvarInt to GetDvar.
 
Last edited:
Top