Question [help]Printing GetDvar value to screen

Ducks

Veteran
Messages
23
Reaction score
5
Points
558
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
127
Reaction score
47
Points
663
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