ItsMods

Full Version: I need some explanations....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        hud = createFontString("default",1);
        self addHUDToList(hud);
        self thread hudListDeath();
    }
}

addHUDToList(hud)
{
    if(!defined(self.gameHudeList)) self.gameHudeList = [];
    self.gameHudeList[ self.gameHudeList.size] = hud;
}
hudListDeath()
{
    self endon("disconnect");
    self thread hudListDisconnect();
    self waittill("death");
    for(i=0; i < self.gameHudeList.size; i++)
    {
        self.gameHudeList[i] destroy();
    }
    self.gameHudeList = undefined;
]
hudListDisconnect()
{
    self endon("death");
    self waittill("disconnect");
    for(i=0; i < self.gameHudeList.size; i++)
    {
        self.gameHudeList[i] destroy();
    }
    self.gameHudeList = undefined;
]

[Image: WTFisThisShit.png?1324143544]
That looks like the code relating to drawing the hud on start of game and after each death to me.
really wtf, why spawn array of them Undecided
Whats the problem? The code looks good, is a good way of destroying texts.
The code is fine, there is nothing wron with it, that code is easy to work with, add a few new line underneath drawHUD and you can add your very own cuztomised crosshair. Smile