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!
Thanks,
Player:setDarkRPVar("HasGunlicense", true)
[QUOTE=Tomelyr;47686003]Player:setDarkRPVar("HasGunlicense", true)[/QUOTE]
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
[lua]
function ENT:Use( eActivator )
eActivator:setDarkRPVar("HasGunlicense", true)
end
[/lua]
In your serverside entity definition.
[QUOTE=James xX;47686198]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
[lua]
function ENT:Use( eActivator )
eActivator:setDarkRPVar("HasGunlicense", true)
end
[/lua]
In your serverside entity definition.[/QUOTE]
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.
Thanks,
Sorry, you need to Log In to post a reply to this thread.