How do I add custom playermodels?

Hey,

I recently got a server and I want to add some new models into it, but whenever I try to add a model, it just shows up as an error sign.
I’ve tried to do it with FastDL through a steam workshop collection and make users download that, but that makes no difference at all.

So after that I’ve tried GMADextractor and extracted the contents of the model into my server.
Once those files were added, I used “Fox-Warriors Resources Generator” and created a “resource.lua” file in my “garrysmod/lua/autorun/server/” folder.

It looks like this:


if (SERVER) then
	resource.addFile( "models/thresh/thresh.mdl" )
	resource.addSingleFile( "models/thresh/thresh.sw.vtx" )
	resource.addFile( "models/thresh/threshfp.mdl" )
	resource.addSingleFile( "models/thresh/threshfp.sw.vtx" )
	resource.addFile( "materials/models/thresh/thresh_base_tx_cm.vmt" )
	resource.addFile( "materials/models/thresh/thresh_base_tx_cm.vtf" )
end

But none of the 2 methods I have tried actually worked.
So how do I do it? I can’t find any good tutorial through google, so I hope someone here could help me.

Thanks in advance,
unknown1138

EDIT:
Just to add, it DOES show up in the player model list.

EDIT2:
Finally found out how to do!

For others who are wondering how I did it:
In your “garrysmod/lua/autorun/server/rescources.lua” add the ID of the mod/model

i.e.:


resource.AddWorkshop("STEAM-MOD-ID")

and place the model/mod in your addons folder (or in your steam workshop collection for your server)