Config = {} Config.UseOldSlingScript = false -- MAKKE THIS TRUE IF YOU WANT TO USE THE OLD VERSION OF THE SCRIPT. VIDEO FOUND HERE: https://youtu.be/Pf-B03cmFtQ if not Config.UseOldSlingScript then ---------- [Framework] ---------- -- (DONT TOUCH THIS UNLESS YOU HAVE A CUSTOM FRAMEWORK) if GetResourceState('es_extended') == 'started' then Framework = "ESX" -- (ESX) or (QBCore) elseif GetResourceState('qb-core') == 'started' then Framework = "QBCore" -- (ESX) or (QBCore) end if Framework == "QBCore" then Config.CoreName = "qb-core" -- your core name FWork = exports[Config.CoreName]:GetCoreObject() elseif Framework == "ESX" then Config.CoreName = "es_extended" -- your core name FWork = exports[Config.CoreName]:getSharedObject() end ------------------------------ ---------- [INTAGERS] ---------- Config.LoopSpeed = 500 -- How fast the loop to check weapons runs. Lower numbers are lest optimized. Config.RackMaxWeight = 45000 -- Rack stash weight capacity. Config.RackSlots = 2 -- Rack stash amount of item slots available. Config.WeaponLimit = 4 -- Ammount of weapons/items that will show up on the player when they have the item or weapon Config.AmountOfTimesToCheckIfTheModelIsLoaded = 10 -- This value adjust the amount of times to check to see if a modle is loaded. The check runs every 100 milliseconds ------------------------------ ---------- [STRINGS] ---------- Config.WeaponRackCommand = "rack" -- /rack command to rack weapons into any service vehicles Config.WeaponSettingCommand = "setweapon" -- (GLOBAL POSITION FOR EVERYONE) /setweapon command to begin editing where the weapons/items should sit on the player Config.PersonalWeponSettingsCommand = "weaponposition" -- (PLAYERS PERSONAL POSITION THAT THEY SET HOW THEY LIKE) You can remove this command from the server.lua ------------------------------ ---------- [TABLES] ---------- Config.RackCapableJobs = { -- Jobs that can do the /rack command "leo", "police", "marshal", } ------------------------------ Config.LangT = { DeleteFromConfig = "DELETE FROM CONFIG", Change = "CHANGE ", ToggleWeapons = "ALL WEAPONS ON/OFF", RotateZ = "ROTATE Z", Up = "UP", Down = "DOWN", Left = "LEFT", Right = "RIGHT", In = "In", Out = "Out", Rotate = "ROTATE", MustBeInVehicle = "You must be in a vehicle", NotPolice = "You are not a police Officer", EmergencyServiceVehicle = "Must be in a emergency service vehicle!", } -- THE ATTACHMENTS WORK BUT SOME SERVERS HAD CRASHING ISSUES WHEN THEY WERE UNHASHED. YOU CAN UNHASH THEM BUT IF YOU CRASH THEN HASH THEM BACK OUT. Config.WeaponsOnBack = {-- THE ATTACHMENTS WORK BUT SOME SERVERS HAD CRASHING ISSUES WHEN THEY WERE UNHASHED. YOU CAN UNHASH THEM BUT IF YOU CRASH THEN HASH THEM BACK OUT. -- Pistols -- Assault Rifles ["weapon_carbinerifle"] = { -- THE ATTACHMENTS WORK BUT SOME SERVERS HAD CRASHING ISSUES WHEN THEY WERE UNHASHED. YOU CAN UNHASH THEM BUT IF YOU CRASH THEN HASH THEM BACK OUT. model = "w_ar_carbinerifle", --Attachments = { --["COMPONENT_CARBINERIFLE_CLIP_01"] = {Base = 'WAPClip',Component = "W_AR_CARBINERIFLE_MAG1"}, --["COMPONENT_CARBINERIFLE_CLIP_02"] = {Base = 'WAPClip',Component = "W_AR_CARBINERIFLE_MAG2"}, --["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr',Component = "W_AT_AR_FLSH"}, --["COMPONENT_AT_SCOPE_MEDIUM"] = {Base = 'WAPScop',Component = "W_AT_SCOPE_MEDIUM"}, --["COMPONENT_AT_AR_SUPP"] = {Base = 'WAPSupp', Component = "W_AT_AR_SUPP"}, --["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip',Component = "W_AT_AR_AFGRIP"}, --} }, ["weapon_carbinerifle_mk2"] = { model = "w_ar_carbineriflemk2", -- Attachments = { -- ["COMPONENT_CARBINERIFLE_MK2_CLIP_01"] = {Base = 'WAPClip', Component = "w_ar_carbineriflemk2_mag1"}, -- ["COMPONENT_CARBINERIFLE_MK2_CLIP_02"] = {Base = 'WAPClip', Component = "w_ar_carbineriflemk2_mag2"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_SIGHTS"] = {Base = 'WAPScop', Component = "w_at_sights_1"}, -- ["COMPONENT_AT_AR_SUPP"] = {Base = 'WAPSupp', Component = "W_AT_AR_SUPP"}, -- ["COMPONENT_AT_MUZZLE_01"] = {Base = 'WAPSupp', Component = "w_at_muzzle_1"}, -- ["COMPONENT_AT_AR_AFGRIP_02"] = {Base = 'WAPGrip', Component = "w_at_afgrip_2"}, -- ["COMPONENT_CARBINERIFLE_MK2_CAMO"] = {Base = 'Cosmetic', Component = "w_at_cr_camo1"}, -- } }, ["weapon_specialcarbine"] = { model = "w_ar_specialcarbine", --Attachments = { --["COMPONENT_SPECIALCARBINE_CLIP_01"] = {Base = 'WAPClip', Component = "w_ar_specialcarbine_mag1"}, --["COMPONENT_SPECIALCARBINE_CLIP_02"] = {Base = 'WAPClip', Component = "w_ar_specialcarbine_mag2"}, --["COMPONENT_SPECIALCARBINE_CLIP_03"] = {Base = 'WAPClip', Component = "w_ar_specialcarbine_boxmag"}, --["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, --["COMPONENT_AT_SCOPE_MEDIUM"] = {Base = 'WAPScop', Component = "w_at_scope_medium"}, --["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, --["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "W_AT_AR_AFGRIP"}, --["COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER"] = {Base = 'Cosmetic', Component = "w_ar_specialcarbine_luxe"}, --} }, ["weapon_advancedrifle"] = { model = "w_ar_advancedrifle", -- Attachments = { -- ["COMPONENT_ADVANCEDRIFLE_CLIP_01"] = {Base = 'WAPClip', Component = "w_ar_advancedrifle_mag1"}, -- ["COMPONENT_ADVANCEDRIFLE_CLIP_02"] = {Base = 'WAPClip', Component = "w_ar_advancedrifle_mag2"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_SCOPE_SMALL"] = {Base = 'WAPScop', Component = "w_at_scope_small"}, -- ["COMPONENT_AT_AR_SUPP"] = {Base = 'WAPSupp', Component = "w_at_ar_supp"}, -- } }, -- Sub Machine Guns ["weapon_assaultsmg"] = { model = "w_sb_assaultsmg", --Attachments = { --["COMPONENT_ASSAULTSMG_CLIP_01"] = {Base = 'WAPClip', Component = "W_SB_ASSAULTSMG_Mag1"}, --["COMPONENT_ASSAULTSMG_CLIP_02"] = {Base = 'WAPClip', Component = "W_SB_ASSAULTSMG_Mag2"}, --["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, --["COMPONENT_AT_SCOPE_MACRO"] = {Base = 'WAPScop', Component = "w_at_scope_macro"}, --["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, --} }, ["weapon_smg"] = { model = "w_sb_smg", --Attachments = { --["COMPONENT_SMG_CLIP_01"] = {Base = 'WAPClip', Component = "w_sb_smg_mag1"}, --["COMPONENT_SMG_CLIP_02"] = {Base = 'WAPClip', Component = "w_sb_smg_mag2"}, --["COMPONENT_SMG_CLIP_03"] = {Base = 'WAPClip', Component = "w_sb_smg_boxmag"}, --["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, --["COMPONENT_AT_SCOPE_MACRO_02"] = {Base = 'WAPScop_2', Component = "w_at_scope_macro_2"}, --["COMPONENT_AT_PI_SUPP"] = {Base = 'WAPSupp', Component = "w_at_pi_supp"}, --} }, ["weapon_smg_mk2"] = { model = "w_sb_smgmk2", -- Attachments = { -- ["COMPONENT_SMG_MK2_CLIP_01"] = {Base = 'WAPClip', Component = "w_sb_smgmk2_mag1"}, -- ["COMPONENT_SMG_MK2_CLIP_02"] = {Base = 'WAPClip', Component = "w_sb_smgmk2_mag2"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_SIGHTS"] = {Base = 'WAPScop', Component = "w_at_sights_1"}, -- ["COMPONENT_AT_SCOPE_SMALL"] = {Base = 'WAPScop', Component = "w_at_scope_small"}, -- ["COMPONENT_AT_AR_AFGRIP_02"] = {Base = 'WAPGrip', Component = "w_at_afgrip_2"}, -- } }, ["weapon_combatpdw"] = { model = "w_sb_pdw", --Attachments = { --["COMPONENT_SMG_MK2_CLIP_01"] = {Base = 'WAPClip', Component = "w_sb_smgmk2_mag1"}, --["COMPONENT_SMG_MK2_CLIP_02"] = {Base = 'WAPClip', Component = "w_sb_smgmk2_mag2"}, --["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, --["COMPONENT_AT_SIGHTS"] = {Base = 'WAPScop', Component = "w_at_sights_1"}, --["COMPONENT_AT_SCOPE_SMALL"] = {Base = 'WAPScop', Component = "w_at_scope_small"}, --["COMPONENT_AT_AR_AFGRIP_02"] = {Base = 'WAPGrip', Component = "w_at_afgrip_2"}, --} }, -- Sniper Rifles ["weapon_musket"] = { model = "w_ar_musket" }, ["weapon_sniperrifle"] = { model = "w_sr_sniperrifle", -- Attachments = { -- ["COMPONENT_SNIPERRIFLE_CLIP_01"] = {Base = 'WAPClip', Component = "w_sr_sniperrifle_mag1"}, -- ["COMPONENT_AT_SCOPE_LARGE"] = {Base = 'WAPScop', Component = "w_at_scope_large"}, -- ["COMPONENT_AT_SCOPE_MAX"] = {Base = 'WAPScop', Component = "w_at_scope_max"}, -- ["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, -- } }, -- Shotguns ["weapon_combatshotgun"] = { model = "w_sg_pumpshotgunh4", -- Attachments = { -- ["COMPONENT_ASSAULTSHOTGUN_CLIP_01"] = {Base = 'WAPClip', Component = "w_sg_assaultshotgun_mag1"}, -- ["COMPONENT_ASSAULTSHOTGUN_CLIP_02"] = {Base = 'WAPClip', Component = "w_sg_assaultshotgun_mag2"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_AR_SUPP"] = {Base = 'WAPSupp', Component = "w_at_ar_supp"}, -- ["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "w_at_ar_afgrip"}, -- } }, ["weapon_bullpupshotgun"] = { model = "w_sg_bullpupshotgun", -- Attachments = { -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, -- ["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "w_at_ar_afgrip"}, -- } }, ["weapon_pumpshotgun"] = { model = "w_sg_pumpshotgun", -- Attachments = { -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_SR_SUPP"] = {Base = 'WAPSupp', Component = "W_AT_AR_SUPP"}, -- } }, ["weapon_heavyshotgun"] = { model = "w_sg_heavyshotgun", -- Attachments = { -- ["COMPONENT_HEAVYSHOTGUN_CLIP_01"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag1"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_02"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag2"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_03"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_boxmag"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, -- ["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "w_at_ar_afgrip"}, -- } }, ["weapon_huntingrifle"] = { model = "w_sr_huntingrifle", -- Attachments = { -- ["COMPONENT_HEAVYSHOTGUN_CLIP_01"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag1"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_02"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag2"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_03"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_boxmag"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, -- ["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "w_at_ar_afgrip"}, -- } }, ["weapon_crossbow"] = { model = "w_sr_crossbow", -- Attachments = { -- ["COMPONENT_HEAVYSHOTGUN_CLIP_01"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag1"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_02"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_mag2"}, -- ["COMPONENT_HEAVYSHOTGUN_CLIP_03"] = {Base = 'WAPClip', Component = "w_sg_heavyshotgun_boxmag"}, -- ["COMPONENT_AT_AR_FLSH"] = {Base = 'WAPFlshLasr', Component = "W_AT_AR_FLSH"}, -- ["COMPONENT_AT_AR_SUPP_02"] = {Base = 'WAPSupp', Component = "w_at_ar_supp_02"}, -- ["COMPONENT_AT_AR_AFGRIP"] = {Base = 'WAPGrip', Component = "w_at_ar_afgrip"}, -- } }, -- Melee Weapons ["weapon_machete"] = { model = "w_me_machette_lr" }, ["weapon_bat"] = { model = "w_me_bat" }, ["weapon_hatchet"] = { model = "w_me_hatchet" }, -- Items ["cokebaggy"] = { model = "bkr_prop_coke_cutblock_01" }, ["markedbills"] = { model = "prop_money_bag_01" }, ["meth"] = { model = "hei_prop_pill_bag_01" }, ["weed_brick"] = { model = "bkr_prop_weed_drying_02a" }, ["fishingrod"] = { model = "prop_fishing_rod_02" }, ["fishingrod2"] = { model = "prop_fishing_rod_01" }, ["fishingrod3"] = { model = "prop_fishing_rod_01" }, -- Addon weapons -- ["weapon_crossbow"] = { model = "w_me_katana"}, -- ["weapon_remington"] = { model = "w_sg_remington" }, -- ["weapon_mp5"] = { model = "w_sb_mp5" }, -- ["weapon_huntingrifle"] = { model = "w_sr_huntingrifle" }, } ------------------------------ ------------------------------ --## DONT CHANGE ANY OF THESE ##-- Config.FrameworkFunctions = { -- Client-side trigger callback TriggerCallback = function(...) if Framework == 'QBCore' then FWork.Functions.TriggerCallback(...) else FWork.TriggerServerCallback(...) end end, -- Server-side register callback CreateCallback = function(...) if Framework == 'QBCore' then FWork.Functions.CreateCallback(...) else FWork.RegisterServerCallback(...) end end, GetPlayer = function() local self = {} if Framework == 'QBCore' then player = FWork.Functions.GetPlayerData() self.PlayerData = { job = { name = player.job.name} } return self else player = FWork.GetPlayerData() self.PlayerData = { job = { name = player.job.name }} return self end return nil end, } ------------------------------ ------------------------------ end