Pointshop player models

So I have FastDL setup to download the workshop addons along with the collection, yet the custom player models in pointshop show up as ERROR. If I subscribe to the player models myself through steam it works just fine. When I joined the server it said it downloaded the items and I checked my garrysmod/downloads to see if it did and they were there. I have no idea what the problem could be and I have already google’d the problem with no success.

Make a file call it workshop.lua or something and put it in your garrysmod/lua/autorun/server/ directory on your server edit the file and

Use

resource.AddWorkshop

to add each adddon after that the file should look something like this:

[lua]resource.AddWorkshop( “312412313” )
resource.AddWorkshop( “123456732” )
resource.AddWorkshop( “231320938” )[/lua]

This will force the clients to download the addons before connecting.

I already have one, this is its contents:

/server/garrysmod/lua/autorun/server/workshop.lua



resource.AddWorkshop("484758803")
resource.AddWorkshop("159321088")
resource.AddWorkshop("389346280")
resource.AddWorkshop("148628139")
resource.AddWorkshop("230245291")
resource.AddWorkshop("257473503")
resource.AddWorkshop("158326196")
resource.AddWorkshop("391383735")
resource.AddWorkshop("111603898")
resource.AddWorkshop("279330893")
resource.AddWorkshop("156924206")
resource.AddWorkshop("121088777")


Can you post the lua file you created to add the playermodel to the pointshop?

daftpunk.lua



if (SERVER) then
	player_manager.AddValidModel("Daft Punk Gold", "models/player/daftpunk/daft_gold.mdl" )
	player_manager.AddValidModel( "Daft Punk Silver", "models/player/daftpunk/daft_silver.mdl" )
	AddCSLuaFile ("daftpunk.lua")
end

list.Set("PlayerOptionsModel", "Daft Punk Gold", "models/player/daftpunk/daft_gold.mdl" )
list.Set( "PlayerOptionsModel", "Daft Punk Silver", "models/player/daftpunk/daft_silver.mdl" )

--// File generated by F0x's Resources Generator 3.0.0 \\--

if ( SERVER ) then
	resource.AddFile( "materials/models/daftpunk/dafthelmet.vmt" )
	resource.AddFile( "materials/models/daftpunk/dafthelmets.vmt" )
	resource.AddFile( "materials/models/daftpunk/dafthelmets.vtf" )
	resource.AddFile( "materials/models/daftpunk/dafthelmets_n.vtf" )
	resource.AddFile( "materials/models/daftpunk/dafthelmet_animation.vtf" )
	resource.AddFile( "materials/models/daftpunk/dafthelmet_normal.vtf" )
	resource.AddFile( "materials/models/daftpunk/dafthelms_animation.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_hand.vmt" )
	resource.AddFile( "materials/models/daftpunk/daft_hand.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_hands.vmt" )
	resource.AddFile( "materials/models/daftpunk/daft_hands.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_hands_n.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_hand_normal.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_suit.vmt" )
	resource.AddFile( "materials/models/daftpunk/daft_suit.vtf" )
	resource.AddFile( "materials/models/daftpunk/daft_suit_n.vtf" )
	resource.AddFile( "models/player/daftpunk/daft_gold.mdl" )
	resource.AddFile( "models/player/daftpunk/daft_gold.dx80.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_gold.dx90.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_gold.phy" )
	resource.AddFile( "models/player/daftpunk/daft_gold.sw.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_gold.vvd" )
	resource.AddFile( "models/player/daftpunk/daft_gold.xbox.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_silver.mdl" )
	resource.AddFile( "models/player/daftpunk/daft_silver.dx80.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_silver.dx90.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_silver.phy" )
	resource.AddFile( "models/player/daftpunk/daft_silver.sw.vtx" )
	resource.AddFile( "models/player/daftpunk/daft_silver.vvd" )
	resource.AddFile( "models/player/daftpunk/daft_silver.xbox.vtx" )
end


daftpunkgold.lua (pointshop one)



ITEM.Name = 'Daft Punk Gold'
ITEM.Price = 10000
ITEM.Model = 'models/player/daftpunk/daft_gold.mdl'

function ITEM:OnEquip(ply, modifications)
	if not ply._OldModel then
		ply._OldModel = ply:GetModel()
	end
	
	timer.Simple(1, function() ply:SetModel(self.Model) end)
end

function ITEM:OnHolster(ply)
	if ply._OldModel then
		ply:SetModel(ply._OldModel)
	end
end

function ITEM:PlayerSetModel(ply)
	ply:SetModel(self.Model)
end



[editline]22nd July 2015[/editline]

Also to note, if you subscribe to the models directly from the workshop they work fine.

You should probably remove the resource.AddFile lines if you’re using workshop. Also, is it just you that is having this problem or anyone who joins?

I had my friend try, he could see all but one model, so I assume he must have had them downloaded from a previous server.

[editline]22nd July 2015[/editline]

Ill try and remove the resource.AddFile and get back to you

There’s an option that disallows downloading 3rd party content, maybe you have that activated? I have no clue how far that takes not using the content that’s downloaded, or maybe it just doesn’t actually download the content even if it’s workshop, but maybe you should look for that in your options menu.

I already checked that, besides I watched it download the files so I know I downloaded them.

[editline]22nd July 2015[/editline]

Removing resource.AddFile does not fix it.

[editline]22nd July 2015[/editline]

@Chimpanzee

[editline]22nd July 2015[/editline]

Anyone?

I genuinely wouldn’t know what’s wrong. Have you tried running a completely clean server with only pointshop, that one item, and those workshop downloads?

I found the problem, the authkey has to be after the host_workshop_collection in the startup paramaters.