• Force Download?
    2 replies, posted
How do i get a car i have on my server to force download the model and texture? How? Every one else sees it as a error, i don't because i already have it installed.
resource.addfile("")
You can "force" players download non standard files from your server (usually assets from addons on your server) by using the commands resource.AddFile() and resource.AddSingleFile(). This is useful for server owners that allow custom content for subscribers and admins. You can find example usages in the above linked page- note that resource.AddSingleFile() and adding each necessary file manually is generally accepted as the best practice to force downloads to clients, for resource.AddFile() may attempt to force downloading of companion files (like phys for models) that may not be present in all files by default- causing the client to become spammed with lua console errors. Usage: For each non- .lua file you want clients to download, add a resource.AddSingleFile( "..folder/file.type" )(Note: you must use quotes around the filepath.) to your game server's "garrysmod/lua/autorun/server/forceddownloads.lua" (you may have to create "forceddownloads.lua if it does not exist: You can simply create a "forceddownloads.txt" in a plain text editor like NotePad and save the file as "forceddownloads.lua" in "garrysmod/lua/autorun/server/" For each .lua (script) file, add a "AddCSLuaFile( "..folder/file.lua" )" line to "forceddownloads.lua" From "http://wiki.garrysmod.com/?title=Admin#Forced_Downloads"
Sorry, you need to Log In to post a reply to this thread.