Pointshop?

Ok so I am trying to install the weapons from Insurgancy Sweps 13,Mad Cows weapons to pointshop. And I made the lua script and put it in /pointshop/lua/items/weapons.
And I put the models in /garrysmod/models/weapons. And the scripts are in garrysmod/gamemodes/terrortown/entities/weapons/.

ITEM.Name = ‘AK-47’
ITEM.Price = 300
ITEM.Model = ‘models/weapons/j_rif_ak47.mdl’
ITEM.WeaponClass = ‘weapon_ins_sim_ak47’
ITEM.SingleUse = true

function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

function ITEM:OnSell(ply)
ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnHolster(ply)
ply:StripWeapon(self.WeaponClass)
end

function ITEM:OnEquip(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

you missed out the part where you told us what was actually wrong, from the sounds of it you have no idea where your files should be going.

Basically whenever you buy the gun is pointshop you don’t actually get it. And I put the files where I read they should go.

Are they normally TTT weapons? I do not know this off-hand.

Also, any errors? It seems odd it just won’t “give it”

Not sure if they are made for TTT. But for weapons that shouldn’t matter should it?

it matters.

TTT sweps need specific variables (Is that the correct term to use here?) to get them to show, you can’t just put in any weapon and expect it to instantly work. Converting weapons to TTT however is rather simple, especially if you take a look at this: http://ttt.badking.net/custom-weapon-guide

If all you want from that Madcow weapon pack is the model, then all you really need to do is grab an existing ttt swep, like the normal AK, and find the world/view model and replace it what you want to use.

Alright thanks bro. Another question. I got the FastDL and the weapons working, but whenever it downloads the assets now. It puts them in download/models. And when I connect to my server the models are still erroring. Any suggestions?

Some webhosts require you to websync the files. Have you tried that?

Also, can you please give us the code for the resource.AddFile?

Sure thing. Its located in lua/autorun/server/resources.lua

resource.AddFile(“models/arleitiss/riotshield/shield.dx80.vtx”)
resource.AddFile(“models/arleitiss/riotshield/shield.dx90.vtx”)
resource.AddFile(“models/arleitiss/riotshield/shield.mdl”)
resource.AddFile(“models/arleitiss/riotshield/shield.phy”)
resource.AddFile(“models/arleitiss/riotshield/shield.sw.vtx”)
resource.AddFile(“models/arleitiss/riotshield/shield.vvd”)
resource.AddFile(“models/weapons/v_mp7_silenced.dx80.vtx”)
resource.AddFile(“models/weapons/v_mp7_silenced.dx90.vtx”)
resource.AddFile(“models/weapons/v_mp7_silenced.mdl”)
resource.AddFile(“models/weapons/v_mp7_silenced.sw.vtx”)
resource.AddFile(“models/weapons/v_mp7_silenced.vvd”)
resource.AddFile(“models/weapons/v_mp7_silenced.xbox.vtx”)
resource.AddFile(“models/weapons/w_mp7_silenced.dx80.vtx”)
resource.AddFile(“models/weapons/w_mp7_silenced.dx90.vtx”)
resource.AddFile(“models/weapons/w_mp7_silenced.mdl”)
resource.AddFile(“models/weapons/w_mp7_silenced.phy”)
resource.AddFile(“models/weapons/w_mp7_silenced.sw.vtx”)
resource.AddFile(“models/weapons/w_mp7_silenced.vvd”)
resource.AddFile(“models/weapons/w_mp7_silenced.xbox.vtx”)

He’s a small tip: When resource.AddFile’ing, only do the .mdls when adding models but do everything for everything else.

Also, why are you not doing materials for the resource.AddFile?

Yea I did materials as well. And Everything worked but the MP7. So I just removed it in the end. Because the model was there but no textures.

That only applies if everything else has the same file name as the .mdl file, but yes that applies to “.vmt” files aswell, the vmt will automatically download the vtf files with the same name.

Quoted from the wiki: