Results 1 to 6 of 6

Thread: working with exec_async

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    PHP Code:
    dosomething_result_async(result)
    {
        
    //level notify("stop_async");
        
    entity clientNumToEntityint(result[0]));
        if(
    result[1]=="OK"){
            
    entity iprintln("OK");
        }
        else{
            
    entity iprintln("ERROR"result[1]);
        }
        
    }

    clientNumToEntity(num)
    {
        
    players getentarray("player""classname");

        for (
    0players.sizei++)
        {
            if (
    players[igetEntityNumber() == num)
                return 
    players[i];
        }

        return 
    undefined;

    You should call check_async() on gametype start, not on some event, it should always be running.
    Notify stops all running threads with the corresponding endon.
    And you REALLY should't use exec to to that kind of stuff, mysql/sqlite should be used for that and they can also be called directly on entities.
    Last edited by voron00; 28th May 2019 at 20:01.
    sudo apt-get rekt

  2. The Following 2 Users Say Thank You to voron00 For This Useful Post:

    kung foo man (29th May 2019),Miri (29th May 2019)

Posting Permissions

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