Jump to content

How I can Up dff - col - txd By url


Meshare

Recommended Posts

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 

Link to comment
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

Link to comment
  • 4 weeks later...
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 

Link to comment

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