So im working on starting my own server and im almost done with it. All i want is the spierman gun to be in the pointshop for single use and perm use for donors. When i download the spiderman gun 2.0 i do not get an mdl file. Just a bunch of LUA files. I have no idea how to add the gun to the pointshop if it doesnt include a mdl file.
It uses a default model already included with GMod: the HL2 pistol.
[QUOTE=code_gs;42851155]It uses a default model already included with GMod: the HL2 pistol.[/QUOTE]
where can i find that mdl?
You don't need it.
can you tell me what i need to do to add it to the pointshop?
[editline]13th November 2013[/editline]
i dont have v_pistol.mdl anywhere
OMG, you don't need it. It is shipped with GMod by default, EVERY GMod copy has it by default.
The default Pointshop actually does come with weapons with it, doesn't it? You can easily grab the file path, which could probably be gotten from Sandbox too, from this file:
[url]https://github.com/adamdburton/pointshop/blob/master/lua/items/weapons/pistol.lua[/url]
[code]ITEM.Model = 'models/weapons/W_pistol.mdl'[/code]
(I think OP may've been referring to the filepath as opposed to finding a copy online)
i have the lua file but im talking about the filepath. models/weapons/w_pistol.mdl is nowhere to be found in my computer. Not on my gmod folder or my server folder. I just want to put spiderman gun into the pointshop but in order to put anything in the point shop i need a mdl file. When i download the spiderman gun addon i dont get a mdl file and If i put models/weapons/W_pistol.mdl wont it just be a pistol instead of a spiderman gun?.
The file is packed into a VPK. The file is technically on your computer but only when garrysmod runs. I know you dont see the file there, But it actually is. Just like HL2 player models. You have tp assume they are theret. If you want to see the actual file, its extracted on your server and in the actual location. If you put the location that NiandraLades said, It should work. Depending on your server version (if you have updated it recently) it will be packed or not. If its new it will be packed BUT the file is still there. You just cant see it. If it is there, Your server is outdate but it will still work.
[QUOTE=rage1414;42860305]i have the lua file but im talking about the filepath. models/weapons/w_pistol.mdl is nowhere to be found in my computer. Not on my gmod folder or my server folder. I just want to put spiderman gun into the pointshop but in order to put anything in the point shop i need a mdl file. When i download the spiderman gun addon i dont get a mdl file and If i put models/weapons/W_pistol.mdl wont it just be a pistol instead of a spiderman gun?.[/QUOTE]
THE SPIDERMAN GUN IS JUST A FUCKING PISTOL
[QUOTE=rage1414;42860305]i have the lua file but im talking about the filepath. models/weapons/w_pistol.mdl is nowhere to be found in my computer. Not on my gmod folder or my server folder. I just want to put spiderman gun into the pointshop but in order to put anything in the point shop i need a mdl file. When i download the spiderman gun addon i dont get a mdl file and If i put models/weapons/W_pistol.mdl wont it just be a pistol instead of a spiderman gun?.[/QUOTE]
I literally just gave you the filepath, and everyone else has already mentioned it comes packaged with Garry's Mod.
The ITEM.Model that is displayed in the pointshop does not relate to your swep. You could use a completely different model to your spiderman swep and it'll still work fine. You could also use ITEM.Material = "" if you'd rather have a picture (maybe spiderman related) than a model file.
Pontshop? I'm starting to think no one is even thinking before their posts..
Ok so i got the spiderman gun to work for the detectives, now im tryin to put it in the pointshop but it wont appear, this is the code im using
[QUOTE]ITEM.Name = 'Spiderman Gun'
ITEM.Price = 200 -- Give it a price
ITEM.Model = 'models/weapons/W_pistol.mdl' -- This is what it will look like in the menu
ITEM.WeaponClass = 'weapon_ttt_spidermangun'
ITEM.SingleUse = true -- Is it not persistent? Do they have to buy a new one each time they want one?
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[/QUOTE]
the code looks alright, did you restart your server?
yeah i tried it like 10 times
Hmm, is the folder for the weapon correctly named? Do you already have an item in that slot?
yea the name is correct and i no item in that slot. The spiderman gun doesnt even appear on the shop at all
Are you sure it's in the right category?
i put it under weapons
[editline]14th November 2013[/editline]
i also put it in accessories and its still not working
any1 know what im doing wrong?
Post the code.
post code in [code] [/code] tags pls, any errors, not showing up means its prolly not being called to the pointshop.
I know that of you have the same filename and/or item name (not sure which) for two items then they won't appear. Check all of your pointshop files to make sure they have different item and model names.
Sorry, you need to Log In to post a reply to this thread.