Jump to content

How I can Up dff - col - txd By url


Meshare

Recommended Posts

Posted

hi guys

how i can Up My Vehicle file - dff - col - txd , to url then Up to server , for fast download server ?

Such as sound Url .

Posted

Use fetchRemote.

I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate.

For example(just quick example):

function startCarDownload() 
fetchRemote ( "http://localhost:1234/cars/derp.dff", myCallback, "", false ) 
end 
addCommandHandler ( "rem", startCarDownload ) 
  
function myCallback( responseData, errno ) 
    if errno == 0 then 
outputChatBox ( "it works" ) 
local newFile = fileCreate("derp.dff")  
if (newFile) then   
    fileWrite(newFile,responseData)  
    fileClose(newFile) 
end 
loadMod() 
    end 
end 
  
function loadMod() 
dff = engineLoadDFF ( "derp.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 
end 

Sometimes I dream about cheese

Posted
Use fetchRemote.

I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate.

For example(just quick example):

function startCarDownload() 
fetchRemote ( "http://localhost:1234/cars/derp.dff", myCallback, "", false ) 
end 
addCommandHandler ( "rem", startCarDownload ) 
  
function myCallback( responseData, errno ) 
    if errno == 0 then 
outputChatBox ( "it works" ) 
local newFile = fileCreate("derp.dff")  
if (newFile) then   
    fileWrite(newFile,responseData)  
    fileClose(newFile) 
end 
loadMod() 
    end 
end 
  
function loadMod() 
dff = engineLoadDFF ( "derp.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 
end 

thanks i will test it :D

  • 4 weeks later...
Posted
function startCarDownload() 
fetchRemote ( "http://pstangerredo.bugs3.com/46.dff", myCallback, "", false ) 
end 
addCommandHandler ( "rem", startCarDownload ) 
  
function myCallback( responseData, errno ) 
    if errno == 0 then 
outputChatBox ( "it works" ) 
local newFile = fileCreate("derp.dff") 
if (newFile) then   
    fileWrite(newFile,responseData) 
    fileClose(newFile) 
end 
loadMod() 
    end 
end 
  
function loadMod() 
dff = engineLoadDFF ( "derp.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 
end 

Posted
Its not working, because for "fetchRemote" on client side, the web host haves to be hosted on the same computer as the server.

i try server but be download file size : 0

Posted

I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate.

Sometimes I dream about cheese

Posted

but hard use xampp need to use it ?

if need and you know how can instal it ?

if you can instal it i will give you my website to instal xampp '

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...