TTT model errors!!

I’m trying to put custom models into my pointshop, but they just show up as errors.
This is the code for one of my models. I’ve put the files in the right places and in fast-dl, so I really don’t know why it isn’t working. In fact anything I’ve tried to add, such as point shop extra masters, with the hats and extra trails, haven’t worked either. They just Don’t show at all.

[lua] --// File Generated By Fox-Warrior’s Resources Generator Version 2.05 \–

if (SERVER) then
resource.AddFile( “v.mdl” )
resource.AddFile( “models/V/v.mdl” )
resource.AddFile( “models/V/Dagger/dagger.mdl” )
resource.AddFile( “materials/models/V/cape.vmt” )
resource.AddFile( “materials/models/V/cape.vtf” )
resource.AddFile( “materials/models/V/hair.vmt” )
resource.AddFile( “materials/models/V/hair.vtf” )
resource.AddFile( “materials/models/V/hat.vmt” )
resource.AddFile( “materials/models/V/hat.vtf” )
resource.AddFile( “materials/models/V/head.vmt” )
resource.AddFile( “materials/models/V/head.vtf” )
resource.AddFile( “materials/models/V/mask.vmt” )
resource.AddFile( “materials/models/V/mask.vtf” )
resource.AddFile( “materials/models/V/mask_normal.vtf” )
resource.AddFile( “materials/models/V/V_sheet.vmt” )
resource.AddFile( “materials/models/V/V_sheet.vtf” )
resource.AddFile( “materials/models/V/V_sheet_normal.vtf” )
resource.AddFile( “materials/models/V/Dagger/grip.vmt” )
resource.AddFile( “materials/models/V/Dagger/grip.vtf” )
resource.AddFile( “materials/models/V/Dagger/grip_normal.vtf” )
resource.AddFile( “materials/models/V/Dagger/reflect.vmt” )
resource.AddFile( “materials/models/V/Dagger/reflect.vtf” )
resource.AddFile( “materials/models/V/Dagger/reflect_normal.vtf” )
resource.AddFile( “Dagger/dagger.mdl” )
end

ITEM.Name = ‘V’
ITEM.Price = 500000
ITEM.Model = ‘models/player/V/v.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
[/lua]

Where is this file located?

Also, these lines of the code can’t possibly be correct?



resource.AddFile( "Dagger/dagger.mdl" )
resource.AddFile( "v.mdl" )


That’s the lua file in my pointshop. What’s wrong with those files?

You do realize resource.addfile derives from /garrysmod, right?

I don’t think it’s very likely you’ve got garrysmod/v.mdl lying around. Since it’s .mdl, I assume it properly belongs inside garrysmod/models

They’re in my models folder, so I’m not sure why it’s dagger/dagger.mdl and v.mdl as those files aren’t in garrysmod/. Maybe my pointshop is bugged? As no addons work for it. It’s the latest one from github ‘pointshop-master’

What are you talking about? Did you not write the file yourself?

Use resource.AddSingleFile("")
and if there are files with the extenstion .sw.vtx files! add them and you should be good!

Adding to what Niandra said earlier, it looks like you’ve got two cases of the same files in your resource.addfile:



resource.AddFile( "v.mdl" )
resource.AddFile( "models/V/v.mdl" )

resource.AddFile( "models/V/Dagger/dagger.mdl" )
resource.AddFile( "Dagger/dagger.mdl" )



Unless one of them’s view and one of them’s world?
either way there’s something wrong with those lines as you need to add the correct
file paths as well.

Ah I see. No I didn’t write the files, I used a program called Fox Warrior Resource Generator. Thanks for the help! I’ll go see if it works now :slight_smile:

Fox warrior has a few issues now; making it yourself is a lot easier now.

I know it’s tedious as fuck to do a bunch yourself, but something always seems to mess up when you use a generator.

Ive never done it before, but it seems quite straight forward. Thanks for helping out I really appreciate it :slight_smile: