An anticheat for qbcore type servers.
For the HasWeaponInInventory function you will need to add GetHash of weapons to your core or else you will get errors!
example:
Shared.Weapons = { [GetHashKey("weapon_unarmed")] = {["name"] = "weapon_unarmed", ["label"] = "Rankos", ["weight"] = 1000, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "placeholder.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "This is a placeholder description"}, [GetHashKey("weapon_fireextinguisher")] = {["name"] = "weapon_fireextinguisher", ["label"] = "Gesintuvas", ["weight"] = 1000, ["type"] = "weapon", ["ammotype"] = 'AMMO_WATER', ["image"] = "fireext.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Gesintuvas gaisrui?"}, [GetHashKey("weapon_stungun")] = {["name"] = "weapon_stungun", ["label"] = "Tazeris X4", ["weight"] = 5000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "stungun.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Policijos taseris."}, [GetHashKey("weapon_pistol_mk2")] = {["name"] = "weapon_pistol_mk2", ["label"] = "Glock 17", ["weight"] = 7000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "glock-17.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Policijos šaunamasis ginklas."}, [GetHashKey("weapon_snspistol_mk2")] = {["name"] = "weapon_snspistol_mk2", ["label"] = "Sns Pistoletas", ["weight"] = 5000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "snspistol.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Žemės riešutų šaulio įpėdinis tik geresnis."}, [GetHashKey("weapon_heavypistol")] = {["name"] = "weapon_heavypistol", ["label"] = "Sunkus Pistoletas", ["weight"] = 12000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "heavypistol.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Sunkus ginklas."}, [GetHashKey("weapon_vintagepistol")] = {["name"] = "weapon_vintagepistol", ["label"] = "Senovinis Pistoletas", ["weight"] = 7500, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "vintage.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Tikrai klasikinis pistoletas."}, [GetHashKey("weapon_machinepistol")] = {["name"] = "weapon_machinepistol", ["label"] = "Automatinis Pistoletas", ["weight"] = 12000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "machine.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Rattatatatataaaaaa."}, [GetHashKey("weapon_appistol")] = {["name"] = "weapon_appistol", ["label"] = "AP Pistoletas", ["weight"] = 12000, ["type"] = "weapon", ["ammotype"] = "AMMO_PISTOL", ["image"] = "appistol.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Pojau, kokia ugnies jėga."}, [GetHashKey("weapon_microsmg")] = {["name"] = "weapon_microsmg", ["label"] = "Mikro SMG", ["weight"] = 32000, ["type"] = "weapon", ["ammotype"] = "AMMO_SMG", ["image"] = "microsmg.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Pojau, kokia ugnies jėga."}, [GetHashKey("weapon_sawnoffshotgun")] = {["name"] = "weapon_sawnoffshotgun", ["label"] = "Shotgunas", ["weight"] = 15500, ["type"] = "weapon", ["ammotype"] = "AMMO_SHOTGUN", ["image"] = "sawnoff.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Tai yra tikrasis sandoris."}, [GetHashKey("weapon_carbinerifle_mk2")] = {["name"] = "weapon_carbinerifle_mk2", ["label"] = "M4", ["weight"] = 27000, ["type"] = "weapon", ["ammotype"] = "AMMO_RIFLE", ["image"] = "saltmaker.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Karinis ginklas."}, [GetHashKey("weapon_carbinerifle")] = {["name"] = "weapon_carbinerifle", ["label"] = "M4A1", ["weight"] = 35000, ["type"] = "weapon", ["ammotype"] = "AMMO_RIFLE", ["image"] = "m4a1.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Karinis ginklas."}, [GetHashKey("weapon_specialcarbine")] = {["name"] = "weapon_specialcarbine", ["label"] = "MKX245", ["weight"] = 35000, ["type"] = "weapon", ["ammotype"] = "AMMO_RIFLE", ["image"] = "specialcarbine.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Karinis ginklas."}, [GetHashKey("weapon_assaultrifle_mk2")] = {["name"] = "weapon_assaultrifle_mk2", ["label"] = "AK47", ["weight"] = 25000, ["type"] = "weapon", ["ammotype"] = "AMMO_RIFLE", ["image"] = "assaultrifle.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Ak47 yra galia."}, [GetHashKey("weapon_assaultrifle")] = {["name"] = "weapon_assaultrifle", ["label"] = "AK47", ["weight"] = 55000, ["type"] = "weapon", ["ammotype"] = "AMMO_RIFLE", ["image"] = "ak47w.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Ak47 yra galia."}, [GetHashKey("weapon_nightstick")] = {["name"] = "weapon_nightstick", ["label"] = "Teleskopas", ["weight"] = 3000, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "baton.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Policijos teleskopas."}, [GetHashKey("weapon_flashlight")] = {["name"] = "weapon_flashlight", ["label"] = "Prožektorius", ["weight"] = 1350, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "flashlight.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Šviesk man šviesą."}, [GetHashKey("weapon_hatchet")] = {["name"] = "weapon_hatchet", ["label"] = "Kirvis", ["weight"] = 4750, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "hatchet.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Pjauti medieną ar dar ką nors."}, [GetHashKey("weapon_switchblade")] = {["name"] = "weapon_switchblade", ["label"] = "Peilis", ["weight"] = 4750, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "switchblade.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Mirtinas peilis."}, [GetHashKey("weapon_hammer")] = {["name"] = "weapon_hammer", ["label"] = "Plaktukas", ["weight"] = 4750, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "hammer.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Hammer Tap"}, [GetHashKey("weapon_bat")] = {["name"] = "weapon_bat", ["label"] = "Beisbolo Lazda", ["weight"] = 4750, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "bat.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Hammer Tap"}, [GetHashKey("weapon_wrench")] = {["name"] = "weapon_wrench", ["label"] = "Veržliaraktis", ["weight"] = 4750, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "wrench.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Veržliaraktis."}, [GetHashKey("weapon_bread")] = {["name"] = "weapon_bread", ["label"] = "Duona", ["weight"] = 2550, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "baquette.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Graži ilga prancūziška lazda."}, [GetHashKey("weapon_knife")] = {["name"] = "weapon_knife", ["label"] = "Peilis", ["weight"] = 3000, ["type"] = "weapon", ["ammotype"] = nil, ["image"] = "knife.png", ["unique"] = true, ["useable"] = true, ["combinable"] = nil, ["description"] = "Jis aštrus?"}, [GetHashKey("weapon_molotov")] = {["name"] = "weapon_molotov", ["label"] = "Molotovas", ["weight"] = 4550, ["type"] = "weapon", ["ammotype"] = 'nil', ["image"] = "molotov.png", ["unique"] = true, ["useable"] = false, ["combinable"] = nil, ["description"] = "Gražus kokteilis."}, }
Second thing is the Core name.
Example: GBCore ---> QBCore/**Core | In the ** change it to your core.