ozulus Posted August 18, 2015 Share Posted August 18, 2015 (edited) SOLVED Edited February 28, 2016 by Guest Link to comment
XeRo Posted August 18, 2015 Share Posted August 18, 2015 Screen Shot image ?? /debugscript 3 Link to comment
ozulus Posted August 18, 2015 Author Share Posted August 18, 2015 There is no error in /debugscript 3. Link to comment
Sasu Posted August 19, 2015 Share Posted August 19, 2015 When do you call startImageDownload function? Link to comment
ozulus Posted August 19, 2015 Author Share Posted August 19, 2015 (edited) SOLVED Edited February 28, 2016 by Guest Link to comment
ozulus Posted August 19, 2015 Author Share Posted August 19, 2015 (edited) SOLVED Edited February 28, 2016 by Guest Link to comment
t3wz Posted August 19, 2015 Share Posted August 19, 2015 try this: server: function onWin (winner) outputChatBox ( "event called, fetching image..." ) fetchRemote ( "http://i.hizliresim.com/Po0XD7.jpg", function ( response, error ) if error == 0 then if winner then triggerClientEvent ( winner, "onClientGotImage", winner, response ) outputChatBox ( "data sucessfully send to the winner" ) else outputChatBox ( "bad argument (winner) ("..tostring(winner)..")" ) end else outputChatBox ( "error "..error.." when fetching image." ) end end ) end addEvent("onPlayerDestructionDerbyWin",true) addEventHandler("onPlayerDestructionDerbyWin",root,onWin) client: local myTexture addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", root, function( pixels ) outputChatBox ( "client: ok." ) if myTexture and isElement ( myTexture ) then destroyElement( myTexture ) end myTexture = dxCreateTexture( pixels ) end ) addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) basically i only changed resourceRoot to root in the client script (line 4) also i've added some debug texts, if that doesn't work make sure onPlayerDestructionDerbyWin is called somewhere. 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