[SOLVED] Bottom "INFOBAR" text overlapping when player connects.

Posts 1–8 of 8 · Page 1 of 1
[SOLVED] Bottom "INFOBAR" text overlapping when player connects.
For example, I had this.

Rules()
{
while( 1 )
{
iPrintLn("zzz");
iPrintLn("xxx");
iPrintLn("uuu");
wait 59;
}
}
And I add..

self thread Rules(); in -> onPlayerSpawned();

Now the problem is, whenever another player connects, the thing starts again and again, so, instead of repeating it self after a minute, it does it TWICE.

I have tested it with:
level thread Rules();

and also tried adding in onJoinedTeam();

Anyone have a fix?

Thanks.
Make sure to add self endon("disconnect") and ("death") so it looks like this:
Code:
Rules()
{
    self endon("disconnect"); //Ends when user quits the server
    self endon("death"); //Ends when player dies since this gets run again when you spawn again
    while( 1 )
    {
        iPrintLn("zzz");
        iPrintLn("xxx");
        iPrintLn("uuu");
        wait 59;
    }
}
Put
self thread Rules();
under onPlayerSpawned!
Mods, do not close this, testing this.
So, master131, this is my playerspawned

OnPlayerSpawned()
{
self endon("disconnect");
level thread Rules();

for(;
{
self waittill("spawned_player");

}
}


wrong?
no, self thread NOT level thread.
yep, just change that and it works?

edit added thanks
onPlayerSpawned you add
Code:
self thread Rules();
and in the rules thread change
Code:
iPrintLn
to
Code:
self iPrintLn
thanks for that too
/Marked as Solved
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us