As I said before, I'm still pretty new to Lua and not really sure how to do everything yet
So what I want to do is add a category in the PointShop (which I already did) that will contain various melee weapons that you buy, and the one you have equipped is the one you will spawn with every round instead of spawning with the crowbar that the gamemode has you spawn with.
I went to the gamemode's init.lua file and made it so instead of giving you "weapon_crowbar" it gives you a variable, which I made MyDRWeapon
Here's the code for that part of the file
function GM:PlayerLoadout( ply )
ply:Give(MyDRWeapon)
end
MyDRWeapon = "weapon_crowbar"
What I'm unsure of is what do I put in each of the weapons' files in the PointShop addon
I assumed I would need ObEquip, OnHolster, and OnSell, so I set those up for you all
ITEM.Name = 'NameOfWeapon'
ITEM.Price = 10000
ITEM.Model = 'location/of/weapon.mdl'
function ITEM:OnEquip(ply)
end
function ITEM:OnSell(ply)
end
function ITEM:OnHolster(ply)
end
Any help on this is greatly appreciated