Revolutionist Posted October 19, 2012 Share Posted October 19, 2012 Hey. Is there any way for the players to type the URL of the image, and then make the server upload it, after what they could render that image on their screen? Link to comment
denny199 Posted October 19, 2012 Share Posted October 19, 2012 YES IT CAN fetchRemote https://wiki.multitheftauto.com/wiki/FetchRemote Link to comment
Revolutionist Posted October 19, 2012 Author Share Posted October 19, 2012 Aaaaaaaaaaaaaaaaand, how to show it to the players? Just DxCreateTexture or...? Link to comment
denny199 Posted October 19, 2012 Share Posted October 19, 2012 just edit function startImageDownload( playerToReceive ) edit: function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, getRootElement() ) end addEventHandkler ( "onResourceStart", resourceRoot, startImageDownload) function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( getRootElement(), "onClientGotImage", resourceRoot, responseData ) end end Link to comment
Revolutionist Posted October 19, 2012 Author Share Posted October 19, 2012 Alright. But how to make it show up on screen? Link to comment
Castillo Posted October 19, 2012 Share Posted October 19, 2012 Use the example on the wiki page ( what denny edited ). https://wiki.multitheftauto.com/wiki/FetchRemote Link to comment
Revolutionist Posted October 19, 2012 Author Share Posted October 19, 2012 Got it! Thanks a trillion Link to comment
Anderl Posted October 19, 2012 Share Posted October 19, 2012 If you want to save the image on the server you'll need file functions. Link to comment
Revolutionist Posted October 21, 2012 Author Share Posted October 21, 2012 Nah. Saving all the images players type would mean.... You know what. 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