undefined Posted August 2, 2014 Posted August 2, 2014 Hi guys. Im get the this error: 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?
Castillo Posted August 2, 2014 Posted August 2, 2014 The server side is loading faster than the client side, so the event doesn't exist.
TAPL Posted August 2, 2014 Posted August 2, 2014 You can't use the client side to draw the text. You must use the server side text function which i already gave you ready code in your previous topic. https://forum.multitheftauto.com/viewtopic.php?f=91&t=76940
undefined Posted August 3, 2014 Author Posted August 3, 2014 You can't use the client side to draw the text.You must use the server side text function which i already gave you ready code in your previous topic. https://forum.multitheftauto.com/viewtopic.php?f=91&t=76940 It's solved. Thnx.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now