[DarkRP] Function To Check If Someone Has A Gun License?

Hi everyone, the last time I made a post on this website i got absolutely rinsed for being a fuckin’ idiot, which , You know, was well deserved, but I’ve come to ask whether anyone knows if there is a function to check whether someone has a gun license in DarkRP like it says in the title?

I’ve looked on the DarkRP wiki but it’s probable I’m just a bit of a fucktard and missed it.

The reason I require this function is because I’m trying to make something incredibly simple for my first actual productive piece of code.

It’s a simple conditonal statement which just (should) just check whether someone has a gun license and gives the said person a certain swep if they do have a gun license.

Please, instead of rating dumb, tell me what i’ve done wrong in the code below as i’m extremely novice to this and my only experience prior is watching some of code blue’s tutorials.

if true then ply:Give( "gunlicense_card" )
    else return

local hasLicense = ply:getDarkRPVar( “HasGunlicense” )

if ( hasLicense ) then //codens end