OnClientFileDownloadComplete: Difference between revisions
Jump to navigation
Jump to search
OpenIDUser34 (talk | contribs) m (moved OnFileDownloadComplete to OnClientFileDownloadComplete) |
OpenIDUser34 (talk | contribs) No edit summary |
||
Line 24: | Line 24: | ||
end | end | ||
end | end | ||
addEventHandler ( " | addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 11:29, 22 February 2012
my test example until I get a chance to document properly
function onStart ( ) outputChatBox ( "downloading test.mp3" ) downloadFile ( "test.mp3" ) end addEventHandler ( "onClientResourceStart", getRootElement(), onStart ) function onDownloadFinish ( file, success ) if ( success ) then if ( file == "test.mp3" ) then outputChatBox ( "test.mp3 downloaded successfully" ) playSound ( "test.mp3" ) outputChatBox ( "playing test.mp3" ) end else if ( file == "test.mp3" ) then outputChatBox ( "test.mp3 failed to download" ) end end end addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish )
See Also
Other client events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound