undefined Posted June 24, 2014 Share Posted June 24, 2014 Hi guys. I have a problem. I want to when the player download resource, draw text to screen "Resource is downloading. Please wait...". Im how to make this. (i need on download complete and downloading code) Thnx Link to comment
Karuzo Posted June 24, 2014 Share Posted June 24, 2014 Just use isTransferBoxActive to check if its downloading or to check if it has finished the download. Link to comment
#DRAGON!FIRE Posted June 25, 2014 Share Posted June 25, 2014 user on Server Side textCreateDisplay textCreateTextItem textDisplayAddText textDisplayAddObserver To Remove ... : textDisplayRemoveObserver on Client Side Event : "onClientResourceStart" triggerServerEvent Link to comment
Karuzo Posted June 25, 2014 Share Posted June 25, 2014 No need for that complexe script. Just do an if statement in an onClientRender and if isTransferBoxActive returns true just draw the text. Link to comment
TAPL Posted June 25, 2014 Share Posted June 25, 2014 No need for that complexe script. Just do an if statement in an onClientRender and if isTransferBoxActive returns true just draw the text. And you realize that this function/event is client side and he want to draw text when he is downloading and client side won't start until download completed? Server Side: DownloadDisplay = textCreateDisplay() Text = textCreateTextItem("Your text here ...", 0.5, 0.5) textDisplayAddText(DownloadDisplay, Text) addEventHandler("onPlayerJoin", root, function() textDisplayAddObserver(DownloadDisplay, source) end) addEvent("onClientDownloadFinish", true) addEventHandler("onClientDownloadFinish", root, function() if textDisplayIsObserver(DownloadDisplay, source) then textDisplayRemoveObserver(DownloadDisplay, source) end end) Client Side: Timer = setTimer(function() if not isTransferBoxActive() then triggerServerEvent("onClientDownloadFinish", localPlayer) if isTimer(Timer) then killTimer(Timer) end end end, 1000, 0) Link to comment
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