- Messages
- 5,113
- Reaction score
- 2,884
- Points
- 1,103
You can create: 26 uiElements due GSC!
Feel free to test it by yourself:
Include:
Regards,
CabCon.
Feel free to test it by yourself:
Include:
Code:
#using scripts\shared\hud_util_shared;
Code:
function on_player_spawned()
{
if(!self isHost())
return;
wait 10;
self.testElemet = 0;
self thread system_core();
}
function system_core()
{
for(;;)
{
if(self MeleeButtonPressed())
{
self IPrintLn("Pressed");
self.testElemet++;
self.element = self createText("extrabig",1.5, 1, "CabConModding Hud "+self.testElemet, "CENTER", "CENTER", 0, 250 - (10 * self.testElemet), 1, (1,1,1));
wait 0.25;
}
wait .025;
}
}
function createText(font,fontSize, sorts, text, align, relative, x, y, alpha, color)
{
uiElement = hud::createFontString(font, fontSize);
uiElement hud::setPoint(align, relative, x, y);
uiElement settext(text);
uiElement.sort = sorts;
uiElement.hidewheninmenu = true;
if( isDefined(alpha) )
uiElement.alpha = alpha;
if( isDefined(color) )
uiElement.color = color;
return uiElement;
}
Regards,
CabCon.