I make a script for creating a weapon: a gun license!
All is good, the swep a spawnable in the windows “weapons/Other”, but I want this swep is automatically given when a player get a license by a mayor or by a job. And I won’t, the gun license weapon is stripped when the mayor revoked the license!
So I write this and i put this in : /garrysmod/addons/MyAddons/lua/autorun/server/sv_givelisence.lua
function GiveLisence( ply ) if hasLicense == true then ply:Give("gunlisence") else if hasLicense == false then ply:StripWeapon("gunlisence") end end end
And the sweep doesn’t have problems, but she has not given when we do /givelisence
Did my ideas are possibles ?
Could you help me ?