QB-Core Give someone Weapon license?

The Question is How The F*** can i give someone a weapon license is there a command or is it a cop thing i dont know maybe somone knows and can help me out i cant find the right way i do it per DB rn but i think thats not the way it should be

2 Likes

In the city wall where you get the others ?

1 Like

no just if u have it already

You have to be a cop. The command is “/grantlicense [id] weapon”

ps: it’s also in the code if you looked :stuck_out_tongue_winking_eye:

7 Likes

still it says that It wont show me without firearms if I give myself weapon license :slight_smile:

3 Likes

when you have given yourself the license you have to go to city hall and buy the license, the police only give you permission to buy it.

3 Likes

oh thanks!

1 Like

Thank you for posting the answer to this. The license number was showing up in the MDT but ammunation would not sell the guns. I didn’t know you had to go to City Hall and purchase the license for $50. In a previous server I was a member of the people got the license right at the police station when we gave it to them. Up until today this was driving me up the wall.

1 Like

for some reason i get a script error when i do it and i never touched to script to begin with

i cant give out weapons licences beacause of some weird script error and i never touched it can someone please help

How do I remove a license?

1 Like

try it with /revokelicense [id] weapon

1 Like

I havent touched the script, and yes i am in duty but still get this error code

2 Likes

im with qbcore how can i put license in my City Hall?

2 Likes

I have this weapon license script for QB Core in case any interested (practical & theoretical + shooting range). Feel free to ask me any questions.

QB Core licenses work with metada:

local licensesMeta = QBCore.Functions.GetPlayerData().metadata["licences"]
// then check with 
licensesMeta['licenseName']

Cheers!