Jump to content

FetchRemote


Best-Killer

Recommended Posts

Posted

hello guys please an example of FetchRemote Client Side please (images remote ) 

i tried with that but it's not work 

   addEventHandler("onClientResourceStart", resourceRoot, function()
   local f = fetchRemote("https://www.countries-ofthe-world.com/flags-normal/flag-of-Germany.png", function(data, err)
    if(err == 0) then
	local f = fileCreate(v[3])
	fileWrite(f, data)
	fileClose(f)
	outputChatBox("Passed")
	else
	outputChatBox("error")
	end
	end, "", false)
	end)

 

Posted
18 hours ago, pa3ck said:
Note: Client side function only works with the server the player is connected to or it will return the error #1006

but i don't enderstand it xD

6 hours ago, MrDante said:

Ok, but is the algorithm "v[3]" catching a table ?

ye it's catching table 

Posted

Client side function only works with the server the player is connected to  

it's means the featchremote only from server ip right ?? and if my server is localhost what should ip i use to make it work ??

  • Moderators
Posted (edited)

Why don't you use both sides?

Request clientside > trigger > serveride download > trigger > clientside write file.

Else you can better use the downloadFile function.

downloadFile

 

Edited by IIYAMA
  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...