giving a loadout to a player?

Sorry for the noobish question but im developing a new gamemode and im stuck on this

I alredy got a simple inventory that saves all the player items

But im stuck on adding my own weapons AND giving them to the player

as i learned i can alredy give a weapon to the player usin ply:Give(“weapon_pistol”) i just change pistol with the weapon name

but thats my problem HOW can i introduce my own weapon into gmod and load it togeter with my gamemode so if the player buys it i just use ply:Give(“weapon_theweapon!”)

You’d need to create the entity yourself.

This is an example of a SWEP (Scripted Weapon) that you can create.

Also, to implement your weapon into the gamemode, place the three (or single) files into the directory:


steamapps/<Steam Name>/garrysmod/garrysmod/gamemodes/<Gamemode Name>/entities/weapons/<Entity Name(Example:weapon_pistol)>/

(Note: You will most likely need to create the entity name’s folder)

And then you can give it by calling the ply:Give() function

thanks i got all the basics ready but nw i dont know how to use my gamemode on garrysmod i tried using open gm_construct GarrysModCampaign and it seems to load the default gamemode instead

Load GMod, then click ‘Start New Game’, choose your map, then click the little tool/spanner icon on the right hand side, and choose your gamemode from the drop-down box.

thanks

i now got the inventory system and player loadout working i only design the HUD the NPCS and im ready