Adding gun license to a shop!

I have made a custom shop for my server and wondering how I can add a gun license for the npc to sell! Any help would be appreciated!


Player:setDarkRPVar(“HasGunlicense”, true)

Would you mind going into a little more detail? Sorry i’m quite new to coding :L

I’m assuming you are creating your own entity. I can’t program what you want precisely because you haven’t told anyone what that is, but for example, if you want a player to get a gun license when he presses enter on your NPC, you would do

function ENT:Use( eActivator )
eActivator:setDarkRPVar(“HasGunlicense”, true)

In your serverside entity definition.

Oh sorry yes its an entity! Its a shop when you press e on it a user interface opens which displays what you can buy in the shop! I have health and armour working just fine! Now Im trying to make it so once you choose to purchase the gun license it will take $500 from your wallet.