Jump to content

getLatentEventHandles Problem


Soner

Recommended Posts

Hello,

I'm just going to create a mod downloader. I want to display a download drawen. I get the getLatentEventHandles always return a false, although a latent trigger event client is running.

function renderDownload() 
    handle = getLatentEventHandles()[#getLatentEventHandles()]  
    local status = getLatentEventStatus(handle) 
    if not status then 
        removeEventHandler("onClientRender",getRootElement(),renderDownload) 
    end 
    dxDrawText(moddownload.." wird heruntergeladen ["..tostring(status.percentComplete).."%]", px*767, py*894, px*1138, py*934, tocolor(0, 0, 0, 255), 1.00, "pricedown", "center", "bottom", true, false, true, false, false) 
    dxDrawText(moddownload.." wird heruntergeladen ["..tostring(status.percentComplete).."%]", px*766, py*893, px*1137, py*933, tocolor(125, 2, 2, 255), 1.00, "pricedown", "center", "bottom", true, false, true, false, false) 
end 

Regards,

Soner

Link to comment

getLatentEventHandles returns the latent events triggered by the system, which means if you use it client sided, it will return all your triggerLatentServerEvents.

You should instead use getLatentEventHandles and then status on that server sided right after triggering triggerLatentClientEvent and then you could triggerClientEvent the progress to the player you want to show the progress to (there are other good ways to do it too).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...