How can I send clients custom models.

What I want to do is implant some items into my RP script that will use custom models. Is there a way I can have all the models/textures sent to the client when they join the server, so they dont have to go download them separately. I’m running DarkRP(modifying it a lot and making sure not to just become a generic mediocre dark"RP" server).

The server is being rented from Xenon Servers and appears to be setup with a sv_downloadURL, when client join and they dont have the map being played the server send it to them.

Anyone :frowning:

Where exactly would I place the .lua file with that information it?

You need to make it a serverside file and include it in init.lua

Just hook up the directories correctly, you need to send the .mdl path of the models, and all of the textures and any vmt files. Like so:

Example

[lua]resource.AddFile(“models/examplemodel.mdl”)
resource.AddFile(“materials/models/exampleinfo.vtf”)
resource.AddFile(“materials/models/exampleinfo.vmt”)[/lua]

It’s simple.

Okay I ended up putting lines like that into a file called download.lua and placed it in
lua/autorun/server
It appears to be working is there any reason it wouldn’t, I only ask because the people who said they can see the models might have had them before from elsewhere.

is there a way you make them download all of the addons instead of listing each one individually?