PlayAkoya Posted September 10, 2015 Posted September 10, 2015 Hi, Load images from website? For recordable from Google Images: http://www.next-gamer.de/wp-content/upl ... /url17.jpg --Useful Function: function getImageFromWebsite(url) if (url) then local getImageData = --[FUNCTION give the image?? HELP ME pls..] else local getImageData = nil end return getImageData end guiCreateStaticImage(0, 0, 500, 281, tostring(getImageFromWebsite), true) Hope someone here has a chance?
JR10 Posted September 10, 2015 Posted September 10, 2015 fetchRemote Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
PlayAkoya Posted September 10, 2015 Author Posted September 10, 2015 Sorry , I 've looked at fetchRemote and find the Wiki in confusing you could give me in implementing my idea help I would probably need to days for the test, and find out how I need scripts . fetchRemote
JR10 Posted September 10, 2015 Posted September 10, 2015 Server: local img_data addEventHandler('onResourceStart', resourceRoot, function() fetchRemote('http://www.next-gamer.de/wp-content/uploads/2015/05/url17.jpg', function(data, err) if (err ~= 0) then return end img_data = data end) end) addEventHandler('onPlayerJoin', root, function() if (not img_data) then return end triggerClientEvent(source, 'drawImage', resourceRoot) end) Now image data is a string, you can trigger the string to the client and then use dxCreateTexture and dxDrawImage to draw it. local texture addEvent('drawImage', true) addEventHandler('drawImage', root, function(img_data) texture = dxCreateTexture(img_data) if (not texture) then return end addEventHandler('onClientRender', root, drawTexture) end) function drawTexture() dxDrawImage(0, 0, 320, 240, texture) end Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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