Invisible Custom Content

Hello…

I have a kinda annoying problem. I tries to add some custom player models and weapons to my server.
After i uploaded the materials and models to the server, FastDL and made the resource code i restart the server.

I don’t have the resource file on my laptop, but i can tell you that i added every thing from this model
(http://www.garrysmod.org/downloads/?a=view&id=126988) to it.

Everything seems to download correctly. However the custom models i added is invisible.
I have been searching for answers on Google with no luck.

However when i added the models into my own Garry’s Mod they worked so i don’t understand whats wrong.

If anyone can help me with this I would be extremely grateful.

Do you have any code for your resource.AddFile’ing?

In lua/autorun/

[lua]
if (SERVER) then
resource.AddSingleFile( “models/Blades_PLayer.dx80.vtx” )
resource.AddSingleFile( “models/Blades_PLayer.dx90.vtx” )
resource.AddSingleFile( “models/blades_player.mdl” )
resource.AddSingleFile( “models/Blades_PLayer.phy” )
resource.AddSingleFile( “models/Blades_PLayer.sw.vtx” )
resource.AddSingleFile( “models/blades_player.vvd” )
resource.AddSingleFile( “models/Blades_PLayer.xbox.vtx” )
resource.AddSingleFile( “materials/models/player/techknow/blades/armor.vmt” )
resource.AddSingleFile( “materials/models/player/techknow/blades/blade.vtf” )
resource.AddSingleFile( “materials/models/player/techknow/blades/blade_n.vtf” )
resource.AddSingleFile( “materials/models/player/techknow/blades/cape.vmt” )
resource.AddSingleFile( “materials/models/player/techknow/blades/cape.vtf” )
resource.AddSingleFile( “materials/models/player/techknow/blades/cape_n.vtf” )
resource.AddSingleFile( “materials/models/player/techknow/blades/cloths.vmt” )
resource.AddSingleFile( “materials/models/player/techknow/blades/face.vmt” )
resource.AddSingleFile( “materials/models/player/techknow/blades/leather.vmt” )
end
[/lua]

I fixed it. No need for help.

Wait wait, some of my models I force DL on my server show as invisible as well. What did you do to fix this?

What i did was putting the resource code in every individual file. So i use pointshop and one of our models code look like this.

[lua]
ITEM.Name = ‘Suited Citizen’
ITEM.Price = 15000
ITEM.Model = ‘models/player/suits/male_07.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

if (SERVER) then
resource.AddSingleFile( “models/player/suits/male_07.dx80.vtx” )
resource.AddSingleFile( “models/player/suits/male_07.dx90.vtx” )
resource.AddSingleFile( “models/player/suits/male_07.mdl” )
resource.AddSingleFile( “models/player/suits/male_07.phy” )
resource.AddSingleFile( “models/player/suits/male_07.sw.vtx” )
resource.AddSingleFile( “models/player/suits/male_07.vvd” )
resource.AddSingleFile( “models/player/suits/male_07.xbox.vtx” )
resource.AddSingleFile( “materials/models/humans/jackntie/art_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/art_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/breen_sheeb.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/breen_sheeb.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/breen_sheet.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/breen_sheet.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/breen_sheet_normal.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/citizen_sheet.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/citizen_sheet.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/erdim_cylmap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/erdim_cylmap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/eric_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/eric_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/joe_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/joe_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/mike_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/mike_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/sandro_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/sandro_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/ted_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/ted_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/vance_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/vance_facemap.vtf” )
resource.AddSingleFile( “materials/models/humans/jackntie/van_facemap.vmt” )
resource.AddSingleFile( “materials/models/humans/jackntie/van_facemap.vtf” )
end
[/lua]

Okay. Thank you so much. :slight_smile: