Jump to content

Optional Mods


Mike269

Recommended Posts

Hello guys does anyone know any script that include optional mods? Because I have a server and I don't want to make players wait cuz of skins, mods and weapons. A command to turn the gui on could be like /mods and then you click download on mod you like. Thanks!

Link to comment

As far as i know it doesn't exist but is not hard to make.

You just need to make this in meta.xml

<meta> 
     <file src="file.dff" download="false" /> 
     <file src="file.txd" download="false" /> 
</meta> 

And on file.lua

function DonloadFiles() 
    txd = engineLoadTXD("file.txd") 
    engineImportTXD(txd, ID) 
    dff = engineLoadDFF("file.dff", ID) 
    engineReplaceModel(dff, ID) 
end 
addCommandHandler("download", DonloadFiles) 

Link to comment
It won't work, mihayy5. You never downloaded the files. Remove the download="false" in meta.xml and it will work perfect.

Oh yes but your way is not good, he want to download files only by command that means it must do this way:

meta.xml

<meta> 
     <file src="file.dff" download="false" /> 
     <file src="file.txd" download="false" /> 
</meta> 

And Lua:

function DonloadFiles() 
    downloadFile ( "flie.txd" ) 
    downloadFile ( "flie.dff" ) 
    txd = engineLoadTXD("file.txd") 
    engineImportTXD(txd, ID) 
    dff = engineLoadDFF("file.dff", ID) 
    engineReplaceModel(dff, ID) 
end 
addCommandHandler("download", DonloadFiles) 

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