Jump to content

addEvent()


undefined

Recommended Posts

Hi guys.

Im get the this error:

DoJ2Eo.png

Client-Side ["test_c.lua"]

local sx, sy = guiGetScreenSize() 
addEvent("resourceDownloading", true) 
addEventHandler("resourceDownloading", getRootElement(), 
function () 
addEventHandler("onClientRender", root, resourceDownloading) 
end) 
  
function resourceDownloading() 
dxDrawText("Resource is downloading", 0, 0, sx, sy, tocolor(255, 255, 255, 255), (2.00/1366)*sx, (2.00/768)*sy, "bankgothic", "center", "center", false, false, true, false, false) 
end 
  
resourceDownloadingTimer = setTimer(function() 
    if not isTransferBoxActive() then 
        if removeEventHandler("onClientRender", root, resourceDownloading) then end 
        if isTimer(resourceDownloadingTimer) then killTimer(resourceDownloadingTimer) end 
    end 
end, 1000, 0) 

Server-Side ["test_s.lua"]

addEventHandler("onPlayerJoin", getRootElement(), function() 
triggerClientEvent(source, "resourceDownloading", source) 
end) 

meta.xml

"ZoRRoM^" type="script" /> 

Where is the problem? :oops::oops:

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...