Results 1 to 2 of 2

Thread: Little Question :>

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Hi, that should work:

    Code:
    function onlyFiveSeconds()
    {
        self endon("fiveSeconds");
        while (1)
        {
            self waittill("EVENT");
            self iprintlnbold("Hello in less then 5 seconds!");
        }
    }
    
    function killThread()
    {
        wait 5;
        self notify("fiveSeconds");
    }
    
    
    spawnplayer() // some random function
    {
        self onlyFiveSeconds()
        self killThread();
    }
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    KillerBoB (21st December 2012)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •