01-19-2012, 04:28
(This post was last modified: 01-19-2012, 04:29 by ScHmIdTy56789.)
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;
]