1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. GTA Network forum is now in archive mode.

Closed onDownload event doesn't trigger after reconnect

Discussion in 'Solved & Closed' started by Henk, May 16, 2017.

  1. Henk

    Henk Member

    Messages:
    7
    Likes Received:
    0
    Joined:
    May 8, 2017
    Title:
    onDownload event doesn't trigger after reconnect
    What's wrong?:
    The first time i connect to my server i instantiate fine, Once i reconnect it doesn't fire the onDownload. Restarting the server fixes this issue. Restarting the client does not fix it.
    What should normally happen?:
    run the onDownload event
    How to reproduce the issue:
    connect once, disconnect and reconnect again.
    Operating System:
    Windows 10 creators update
    Write any additional information (Use spoilers for images):
    Code:
    API.setEntityData(player, "DOWNLOAD_FINISHED", true);
                API.sendChatMessageToPlayer(player, "Welcome to ~b~this server... ~y~V0.1 ~w~Please wait while we load in your HUD!");
                API.triggerClientEvent(player, "createCamera", _skinSelectorCamPos, _skinSelectorPos);
                API.consoleOutput("Test");
                API.call("LoginManager", "Init", player);
    
    As you can see in this image below, and compare it to the onDownload snippet above. the consoleOutput("test") only emits once.

    [​IMG]
     
  2. BigJay

    BigJay Well-Known Member Donator Support

    Messages:
    131
    Likes Received:
    29
    Joined:
    Jan 23, 2017
    It sounds potentially like when you reconnect it doesn't need to download again as your client already has the latest? I'm not sure if this is the reason, but it sounds plausible.
     
  3. Henk

    Henk Member

    Messages:
    7
    Likes Received:
    0
    Joined:
    May 8, 2017
    @BigJay I changed it to onPlayerConnect. It has the same effect. It doesn't execute after reconnecting + i can't exactly run client-side code in it as it might not be downloaded before it executes or its unreliable.
     
  4. Scrome

    Scrome Member

    Messages:
    19
    Likes Received:
    3
    Joined:
    Jan 23, 2017
    The client should download if you delete "...\GTANetwork\resources\"yourserver"" between your reconnects. Otherwise I see no reason in downloading files a second time if they do already exist.
     
  5. Henk

    Henk Member

    Messages:
    7
    Likes Received:
    0
    Joined:
    May 8, 2017
    @Scrome, But even then, If i reconnect the onPlayerConnect event doesn't seem to fire.
     
  6. denNorske

    denNorske Member Donator

    Messages:
    10
    Likes Received:
    4
    Joined:
    Dec 24, 2016
    Have you tried using onPlayerBeginConnect to see if that executes?
     
  7. Henk

    Henk Member

    Messages:
    7
    Likes Received:
    0
    Joined:
    May 8, 2017
    @denNorske, Just tested it, Doesn't execute either.
     
  8. Vance

    Vance Well-Known Member

    Messages:
    244
    Likes Received:
    40
    Joined:
    Aug 31, 2016
    I've noticed this problem and are working on it.
     
    Henk likes this.
  9. Henk

    Henk Member

    Messages:
    7
    Likes Received:
    0
    Joined:
    May 8, 2017
    Thank you, Do you know if the fix will be in the next update?
     
  10. Vance

    Vance Well-Known Member

    Messages:
    244
    Likes Received:
    40
    Joined:
    Aug 31, 2016
    It's actually what we are working on currently. It's seems almost gamebreaking, so I think we're trying very hard to get it fixed. If not it will be hotfixed soon after.
     

Share This Page