diff --git a/package-lock.json b/package-lock.json index 8d2da5b0e..e7a176d2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "devDependencies": { - "eslint": "^9.16.0" + "eslint": "^9.17.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -93,11 +93,10 @@ } }, "node_modules/@eslint/js": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", - "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", "dev": true, - "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -327,9 +326,9 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", - "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -378,18 +377,17 @@ } }, "node_modules/eslint": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", - "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dev": true, - "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.16.0", + "@eslint/js": "9.17.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -398,7 +396,7 @@ "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.5", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", @@ -694,8 +692,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -878,7 +875,6 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -916,7 +912,6 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -929,7 +924,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -986,7 +980,6 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, diff --git a/package.json b/package.json index ac5ecc33f..d7a7bb6f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "eslint": "^9.16.0" + "eslint": "^9.17.0" }, "dependencies": { "dompurify": "^3.2.1" diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/client/main.lua b/server-data/resources/[bpt_addons]/bpt_policejob/client/main.lua index 14251c797..1b67c9e79 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/client/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/client/main.lua @@ -82,7 +82,6 @@ function OpenCloakroomMenu() TriggerServerEvent("esx_service:notifyAllInService", notification, "police") TriggerServerEvent("esx_service:disableService", "police") - TriggerEvent("bpt_policejob:updateBlip") ESX.ShowNotification(TranslateCap("service_out")) end end, "police") @@ -110,7 +109,6 @@ function OpenCloakroomMenu() } TriggerServerEvent("esx_service:notifyAllInService", notification, "police") - TriggerEvent("bpt_policejob:updateBlip") ESX.ShowNotification(TranslateCap("service_in")) end end, "police") @@ -126,7 +124,6 @@ function OpenCloakroomMenu() } TriggerServerEvent("esx_service:notifyAllInService", notification, "police") - TriggerEvent("bpt_policejob:updateBlip") ESX.ShowNotification(TranslateCap("service_in")) end else @@ -197,8 +194,6 @@ function OpenArmoryMenu(station) OpenGetWeaponMenu() elseif data.current.value == "put_weapon" then OpenPutWeaponMenu() - elseif data.current.value == "buy_weapons" then - OpenBuyWeaponsMenu() elseif data.current.value == "put_stock" then OpenPutStocksMenu() elseif data.current.value == "get_stock" then @@ -469,7 +464,7 @@ function OpenBodySearchMenu(player) end ESX.OpenContext("right", elements, function(_, element) - local data = { current = element } + data = { current = element } if data.current.value then TriggerServerEvent("bpt_policejob:confiscatePlayerItem", GetPlayerServerId(player), data.current.itemType, data.current.value, data.current.amount) OpenBodySearchMenu(player) @@ -515,7 +510,7 @@ function OpenFineCategoryMenu(player, category) { unselectable = true, icon = "fas fa-scroll", title = TranslateCap("fine") }, } - for k, fine in ipairs(fineList[category]) do + for _, fine in ipairs(fineList[category]) do elements[#elements + 1] = { icon = "fas fa-scroll", title = ('%s %s'):format(fine.label, TranslateCap("armory_item", ESX.Math.GroupDigits(fine.amount))), @@ -585,7 +580,7 @@ function LookupVehicle(elementF) ESX.ShowNotification(TranslateCap("search_database_error_invalid")) else ESX.TriggerServerCallback("bpt_policejob:getVehicleInfos", function(retrivedInfo) - local elements = { + elements = { { unselectable = true, icon = "fas fa-car", title = element.title }, { unselectable = true, icon = "fas fa-car", title = TranslateCap("plate", retrivedInfo.plate) }, } @@ -596,7 +591,7 @@ function LookupVehicle(elementF) elements[#elements + 1] = { unselectable = true, icon = "fas fa-user", title = TranslateCap("owner", retrivedInfo.owner) } end - ESX.OpenContext("right", elements, nil, function(menu) + ESX.OpenContext("right", elements, nil, function() OpenPoliceActionsMenu() end) end, data.value) @@ -726,116 +721,6 @@ function OpenPutWeaponMenu() end) end -function OpenBuyWeaponsMenu() - local elements = { - { unselectable = true, icon = "fas fa-gun", title = TranslateCap("armory_weapontitle") }, - } - local playerPed = PlayerPedId() - - for k, v in ipairs(Config.AuthorizedWeapons[ESX.PlayerData.job.grade_name]) do - local weaponNum, weapon = ESX.GetWeapon(v.weapon) - local components, label = {}, nil - local hasWeapon = HasPedGotWeapon(playerPed, joaat(v.weapon), false) - - if v.components then - for i = 1, #v.components do - if v.components[i] then - local component = weapon.components[i] - local hasComponent = HasPedGotWeaponComponent(playerPed, joaat(v.weapon), component.hash) - - if hasComponent then - label = ('%s: %s'):format(component.label, TranslateCap("armory_owned")) - else - if v.components[i] > 0 then - label = ('%s: %s'):format(component.label, TranslateCap("armory_item", ESX.Math.GroupDigits(v.components[i]))) - else - label = ('%s: %s'):format(component.label, TranslateCap("armory_free")) - end - end - - components[#components + 1] = { - icon = "fas fa-gun", - title = label, - componentLabel = component.label, - hash = component.hash, - name = component.name, - price = v.components[i], - hasComponent = hasComponent, - componentNum = i, - } - end - end - end - - if hasWeapon and v.components then - label = ('%s: >'):format(weapon.label) - elseif hasWeapon and not v.components then - label = ('%s: %s'):format(weapon.label, TranslateCap("armory_owned")) - else - if v.price > 0 then - label = ('%s: %s'):format(weapon.label, TranslateCap("armory_item", ESX.Math.GroupDigits(v.price))) - else - label = ('%s: %s'):format(weapon.label, TranslateCap("armory_free")) - end - end - - elements[#elements + 1] = { - icon = "fas fa-gun", - title = label, - weaponLabel = weapon.label, - name = weapon.name, - components = components, - price = v.price, - hasWeapon = hasWeapon, - } - end - - ESX.OpenContext("right", elements, function(menu, element) - local data = { current = element } - if data.current.hasWeapon then - if #data.current.components > 0 then - OpenWeaponComponentShop(data.current.components, data.current.name, menu) - end - else - ESX.TriggerServerCallback("bpt_policejob:buyWeapon", function(bought) - if bought then - if data.current.price > 0 then - ESX.ShowNotification(TranslateCap("armory_bought", data.current.weaponLabel, ESX.Math.GroupDigits(data.current.price))) - end - - ESX.CloseContext() - OpenBuyWeaponsMenu() - else - ESX.ShowNotification(TranslateCap("armory_money")) - end - end, data.current.name, 1) - end - end) -end - -function OpenWeaponComponentShop(components, weaponName, parentShop) - ESX.OpenContext("right", components, function(menu, element) - local data = { current = element } - if data.current.hasComponent then - ESX.ShowNotification(TranslateCap("armory_hascomponent")) - else - ESX.TriggerServerCallback("bpt_policejob:buyWeapon", function(bought) - if bought then - if data.current.price > 0 then - ESX.ShowNotification(TranslateCap("armory_bought", data.current.componentLabel, ESX.Math.GroupDigits(data.current.price))) - end - - ESX.CloseContext() - parentShop.close() - OpenBuyWeaponsMenu() - else - ESX.ShowNotification(TranslateCap("armory_money")) - end - end, weaponName, 2, data.current.componentNum) - end - end) -end - function OpenGetStocksMenu() ESX.TriggerServerCallback("bpt_policejob:getStockItems", function(items) local elements = { @@ -939,16 +824,6 @@ function OpenPutStocksMenu() end) end -function OnPlayerData(k, v) - if k ~= "job" then - return - end - if v.name == "police" then - Wait(1000) - TriggerServerEvent("bpt_policejob:forceBlip") - end -end - AddEventHandler("bpt_policejob:hasEnteredMarker", function(station, part, partNum) if part == "Cloakroom" then CurrentAction = "menu_cloakroom" @@ -991,8 +866,8 @@ AddEventHandler("bpt_policejob:hasEnteredEntityZone", function(entity) end if GetEntityModel(entity) == `p_ld_stinger_s` then - local playerPed = PlayerPedId() - local coords = GetEntityCoords(playerPed) + playerPed = PlayerPedId() + local _ = GetEntityCoords(playerPed) if IsPedInAnyVehicle(playerPed, false) then local vehicle = GetVehiclePedIsIn(playerPed) @@ -1210,7 +1085,7 @@ end) -- Create blips CreateThread(function() - for k, v in pairs(Config.PoliceStations) do + for _, v in pairs(Config.PoliceStations) do local blip = AddBlipForCoord(v.Blip.Coords) SetBlipSprite(blip, v.Blip.Sprite) @@ -1475,40 +1350,6 @@ function CreateBlip(id) end end -RegisterNetEvent("bpt_policejob:updateBlip") -AddEventHandler("bpt_policejob:updateBlip", function() - -- Refresh all blips - for k, existingBlip in pairs(blipsCops) do - RemoveBlip(existingBlip) - end - - -- Clean the blip table - blipsCops = {} - - -- Enable blip? - if Config.EnableESXService and not playerInService then - return - end - - if not Config.EnableJobBlip then - return - end - - -- Is the player a cop? In that case show all the blips for other cops - if ESX.PlayerData.job and ESX.PlayerData.job.name == "police" then - ESX.TriggerServerCallback("bpt_society:getOnlinePlayers", function(players) - for i = 1, #players, 1 do - if players[i].job.name == "police" then - local id = GetPlayerFromServerId(players[i].source) - if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then - CreateBlip(id) - end - end - end - end) - end -end) - AddEventHandler("esx:onPlayerSpawn", function(spawn) isDead = false TriggerEvent("bpt_policejob:unrestrain") @@ -1561,9 +1402,3 @@ function ImpoundVehicle(vehicle) ESX.ShowNotification(TranslateCap("impound_successful")) currentTask.busy = false end - -if ESX.PlayerLoaded and ESX.PlayerData.job == "police" then - SetTimeout(1000, function() - TriggerServerEvent("bpt_policejob:forceBlip") - end) -end diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua b/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua index f9138322d..0c56abefb 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua @@ -1,3 +1,5 @@ +---@diagnostic disable: undefined-global + local spawnedVehicles = {} function OpenVehicleSpawnerMenu(type, station, part, partNum) diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/config.lua b/server-data/resources/[bpt_addons]/bpt_policejob/config.lua index 40e662da4..6c14253b0 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/config.lua @@ -11,7 +11,6 @@ Config.EnableESXOptionalneeds = false -- Enable if you're using esx_optionalneed Config.EnableLicenses = true -- Enable if you're using esx_license. Config.EnableHandcuffTimer = true -- Enable handcuff timer? will unrestrain player after the time ends. Config.HandcuffTimer = 10 * 60000 -- 10 minutes. -Config.EnableJobBlip = false -- Enable blips for cops on duty, requires bpt_society. Config.EnableESXService = false -- Enable esx service? Config.MaxInService = -1 -- How many people can be in service at once? Set as -1 to have no limit Config.EnableFinePresets = false -- Set to false to use a custom input fields for fines @@ -20,368 +19,368 @@ Config.OxInventory = ESX.GetConfig().OxInventory Config.PoliceStations = { - LSPD = { - - Blip = { - Coords = vector3(425.1, -979.5, 30.7), - Sprite = 60, - Display = 4, - Scale = 1.2, - Colour = 29, - }, - - Cloakrooms = { - vector3(462.145050, -999.468140, 30.678345), - }, - - Armories = { - vector3(487.239563, -996.949463, 30.678345), - }, - - Vehicles = { - { - Spawner = vector3(454.6, -1017.4, 28.4), - InsideShop = vector3(444.553833, -1019.498901, 28.605835), - SpawnPoints = { - { coords = vector3(438.4, -1018.3, 27.7), heading = 90.0, radius = 6.0 }, - { coords = vector3(441.0, -1024.2, 28.3), heading = 90.0, radius = 6.0 }, - { coords = vector3(453.5, -1022.2, 28.0), heading = 90.0, radius = 6.0 }, - { coords = vector3(450.9, -1016.5, 28.1), heading = 90.0, radius = 6.0 }, - }, - }, - - { - Spawner = vector3(473.3, -1018.8, 28.0), - InsideShop = vector3(228.5, -993.5, -99.0), - SpawnPoints = { - { coords = vector3(475.9, -1021.6, 28.0), heading = 276.1, radius = 6.0 }, - { coords = vector3(484.1, -1023.1, 27.5), heading = 302.5, radius = 6.0 }, - }, - }, - }, - - Helicopters = { - { - Spawner = vector3(461.1, -981.5, 43.6), - InsideShop = vector3(477.0, -1106.4, 43.0), - SpawnPoints = { - { coords = vector3(449.5, -981.2, 43.6), heading = 92.6, radius = 10.0 }, - }, - }, - }, - - BossActions = { - vector3(462.052734, -985.582397, 30.712036), - }, - }, + LSPD = { + + Blip = { + Coords = vector3(425.1, -979.5, 30.7), + Sprite = 60, + Display = 4, + Scale = 1.2, + Colour = 29, + }, + + Cloakrooms = { + vector3(462.145050, -999.468140, 30.678345), + }, + + Armories = { + vector3(487.239563, -996.949463, 30.678345), + }, + + Vehicles = { + { + Spawner = vector3(454.6, -1017.4, 28.4), + InsideShop = vector3(444.553833, -1019.498901, 28.605835), + SpawnPoints = { + { coords = vector3(438.4, -1018.3, 27.7), heading = 90.0, radius = 6.0 }, + { coords = vector3(441.0, -1024.2, 28.3), heading = 90.0, radius = 6.0 }, + { coords = vector3(453.5, -1022.2, 28.0), heading = 90.0, radius = 6.0 }, + { coords = vector3(450.9, -1016.5, 28.1), heading = 90.0, radius = 6.0 }, + }, + }, + + { + Spawner = vector3(473.3, -1018.8, 28.0), + InsideShop = vector3(228.5, -993.5, -99.0), + SpawnPoints = { + { coords = vector3(475.9, -1021.6, 28.0), heading = 276.1, radius = 6.0 }, + { coords = vector3(484.1, -1023.1, 27.5), heading = 302.5, radius = 6.0 }, + }, + }, + }, + + Helicopters = { + { + Spawner = vector3(461.1, -981.5, 43.6), + InsideShop = vector3(477.0, -1106.4, 43.0), + SpawnPoints = { + { coords = vector3(449.5, -981.2, 43.6), heading = 92.6, radius = 10.0 }, + }, + }, + }, + + BossActions = { + vector3(462.052734, -985.582397, 30.712036), + }, + }, } Config.AuthorizedWeapons = { - recruit = { - { weapon = "WEAPON_STUNGUN", price = 1500 }, - { weapon = "WEAPON_FLASHLIGHT", price = 80 }, - }, - - officer = { - { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, - { weapon = "WEAPON_STUNGUN", price = 500 }, - { weapon = "WEAPON_FLASHLIGHT", price = 0 }, - }, - - sergeant = { - { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, - { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, - { weapon = "WEAPON_STUNGUN", price = 500 }, - { weapon = "WEAPON_FLASHLIGHT", price = 0 }, - }, - - lieutenant = { - { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, - { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, - { weapon = "WEAPON_STUNGUN", price = 500 }, - { weapon = "WEAPON_FLASHLIGHT", price = 0 }, - }, - - boss = { - { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, - { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, - { weapon = "WEAPON_STUNGUN", price = 500 }, - { weapon = "WEAPON_FLASHLIGHT", price = 0 }, - }, + recruit = { + { weapon = "WEAPON_STUNGUN", price = 1500 }, + { weapon = "WEAPON_FLASHLIGHT", price = 80 }, + }, + + officer = { + { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, + { weapon = "WEAPON_STUNGUN", price = 500 }, + { weapon = "WEAPON_FLASHLIGHT", price = 0 }, + }, + + sergeant = { + { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, + { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, + { weapon = "WEAPON_STUNGUN", price = 500 }, + { weapon = "WEAPON_FLASHLIGHT", price = 0 }, + }, + + lieutenant = { + { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, + { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, + { weapon = "WEAPON_STUNGUN", price = 500 }, + { weapon = "WEAPON_FLASHLIGHT", price = 0 }, + }, + + boss = { + { weapon = "WEAPON_ADVANCEDRIFLE", components = { 0, 6000, 1000, 4000, 8000, nil }, price = 50000 }, + { weapon = "WEAPON_PUMPSHOTGUN", components = { 2000, 6000, nil }, price = 70000 }, + { weapon = "WEAPON_STUNGUN", price = 500 }, + { weapon = "WEAPON_FLASHLIGHT", price = 0 }, + }, } Config.AuthorizedVehicles = { - car = { - recruit = {}, - - officer = { - { model = "police3", price = 20000 }, - }, - - sergeant = { - { model = "policet", price = 18500 }, - { model = "policeb", price = 30500 }, - }, - - lieutenant = { - { model = "riot", price = 70000 }, - { model = "fbi2", price = 60000 }, - }, - - boss = { - { model = "riot", price = 70000 }, - { model = "fbi2", price = 60000 }, - { model = "fbi", price = 60000 }, - { model = "policet", price = 18500 }, - { model = "policeb", price = 30500 }, - { model = "police3", price = 20000 }, - { model = "police3", price = 20000 }, - }, - }, - - helicopter = { - recruit = {}, - - officer = {}, - - sergeant = {}, - - lieutenant = { - { model = "polmav", props = { modLivery = 0 }, price = 200000 }, - }, - - boss = { - { model = "polmav", props = { modLivery = 0 }, price = 100000 }, - }, - }, + car = { + recruit = {}, + + officer = { + { model = "police3", price = 20000 }, + }, + + sergeant = { + { model = "policet", price = 18500 }, + { model = "policeb", price = 30500 }, + }, + + lieutenant = { + { model = "riot", price = 70000 }, + { model = "fbi2", price = 60000 }, + }, + + boss = { + { model = "riot", price = 70000 }, + { model = "fbi2", price = 60000 }, + { model = "fbi", price = 60000 }, + { model = "policet", price = 18500 }, + { model = "policeb", price = 30500 }, + { model = "police3", price = 20000 }, + { model = "police3", price = 20000 }, + }, + }, + + helicopter = { + recruit = {}, + + officer = {}, + + sergeant = {}, + + lieutenant = { + { model = "polmav", props = { modLivery = 0 }, price = 200000 }, + }, + + boss = { + { model = "polmav", props = { modLivery = 0 }, price = 100000 }, + }, + }, } -- CHECK SKINCHANGER CLIENT MAIN.LUA for matching elements Config.Uniforms = { - recruit = { - male = { - tshirt_1 = 58, - tshirt_2 = 0, - torso_1 = 55, - torso_2 = 0, - decals_1 = 8, - decals_2 = 3, - arms = 41, - pants_1 = 25, - pants_2 = 0, - shoes_1 = 25, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - female = { - tshirt_1 = 36, - tshirt_2 = 1, - torso_1 = 48, - torso_2 = 0, - decals_1 = 0, - decals_2 = 0, - arms = 44, - pants_1 = 34, - pants_2 = 0, - shoes_1 = 27, - shoes_2 = 0, - helmet_1 = 45, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - }, - - officer = { - male = { - tshirt_1 = 58, - tshirt_2 = 0, - torso_1 = 55, - torso_2 = 0, - decals_1 = 0, - decals_2 = 0, - arms = 41, - pants_1 = 25, - pants_2 = 0, - shoes_1 = 25, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - female = { - tshirt_1 = 35, - tshirt_2 = 0, - torso_1 = 48, - torso_2 = 0, - decals_1 = 0, - decals_2 = 0, - arms = 44, - pants_1 = 34, - pants_2 = 0, - shoes_1 = 27, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - }, - - sergeant = { - male = { - tshirt_1 = 58, - tshirt_2 = 0, - torso_1 = 55, - torso_2 = 0, - decals_1 = 8, - decals_2 = 1, - arms = 41, - pants_1 = 25, - pants_2 = 0, - shoes_1 = 25, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - female = { - tshirt_1 = 35, - tshirt_2 = 0, - torso_1 = 48, - torso_2 = 0, - decals_1 = 7, - decals_2 = 1, - arms = 44, - pants_1 = 34, - pants_2 = 0, - shoes_1 = 27, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - }, - - lieutenant = { - male = { - tshirt_1 = 58, - tshirt_2 = 0, - torso_1 = 55, - torso_2 = 0, - decals_1 = 8, - decals_2 = 2, - arms = 41, - pants_1 = 25, - pants_2 = 0, - shoes_1 = 25, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - female = { - tshirt_1 = 35, - tshirt_2 = 0, - torso_1 = 48, - torso_2 = 0, - decals_1 = 7, - decals_2 = 2, - arms = 44, - pants_1 = 34, - pants_2 = 0, - shoes_1 = 27, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - }, - - boss = { - male = { - tshirt_1 = 58, - tshirt_2 = 0, - torso_1 = 55, - torso_2 = 0, - decals_1 = 8, - decals_2 = 3, - arms = 41, - pants_1 = 25, - pants_2 = 0, - shoes_1 = 25, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - female = { - tshirt_1 = 35, - tshirt_2 = 0, - torso_1 = 48, - torso_2 = 0, - decals_1 = 7, - decals_2 = 3, - arms = 44, - pants_1 = 34, - pants_2 = 0, - shoes_1 = 27, - shoes_2 = 0, - helmet_1 = -1, - helmet_2 = 0, - chain_1 = 0, - chain_2 = 0, - ears_1 = 2, - ears_2 = 0, - }, - }, - - bullet_wear = { - male = { - bproof_1 = 11, - bproof_2 = 1, - }, - female = { - bproof_1 = 13, - bproof_2 = 1, - }, - }, - - gilet_wear = { - male = { - tshirt_1 = 59, - tshirt_2 = 1, - }, - female = { - tshirt_1 = 36, - tshirt_2 = 1, - }, - }, + recruit = { + male = { + tshirt_1 = 58, + tshirt_2 = 0, + torso_1 = 55, + torso_2 = 0, + decals_1 = 8, + decals_2 = 3, + arms = 41, + pants_1 = 25, + pants_2 = 0, + shoes_1 = 25, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + female = { + tshirt_1 = 36, + tshirt_2 = 1, + torso_1 = 48, + torso_2 = 0, + decals_1 = 0, + decals_2 = 0, + arms = 44, + pants_1 = 34, + pants_2 = 0, + shoes_1 = 27, + shoes_2 = 0, + helmet_1 = 45, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + }, + + officer = { + male = { + tshirt_1 = 58, + tshirt_2 = 0, + torso_1 = 55, + torso_2 = 0, + decals_1 = 0, + decals_2 = 0, + arms = 41, + pants_1 = 25, + pants_2 = 0, + shoes_1 = 25, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + female = { + tshirt_1 = 35, + tshirt_2 = 0, + torso_1 = 48, + torso_2 = 0, + decals_1 = 0, + decals_2 = 0, + arms = 44, + pants_1 = 34, + pants_2 = 0, + shoes_1 = 27, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + }, + + sergeant = { + male = { + tshirt_1 = 58, + tshirt_2 = 0, + torso_1 = 55, + torso_2 = 0, + decals_1 = 8, + decals_2 = 1, + arms = 41, + pants_1 = 25, + pants_2 = 0, + shoes_1 = 25, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + female = { + tshirt_1 = 35, + tshirt_2 = 0, + torso_1 = 48, + torso_2 = 0, + decals_1 = 7, + decals_2 = 1, + arms = 44, + pants_1 = 34, + pants_2 = 0, + shoes_1 = 27, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + }, + + lieutenant = { + male = { + tshirt_1 = 58, + tshirt_2 = 0, + torso_1 = 55, + torso_2 = 0, + decals_1 = 8, + decals_2 = 2, + arms = 41, + pants_1 = 25, + pants_2 = 0, + shoes_1 = 25, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + female = { + tshirt_1 = 35, + tshirt_2 = 0, + torso_1 = 48, + torso_2 = 0, + decals_1 = 7, + decals_2 = 2, + arms = 44, + pants_1 = 34, + pants_2 = 0, + shoes_1 = 27, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + }, + + boss = { + male = { + tshirt_1 = 58, + tshirt_2 = 0, + torso_1 = 55, + torso_2 = 0, + decals_1 = 8, + decals_2 = 3, + arms = 41, + pants_1 = 25, + pants_2 = 0, + shoes_1 = 25, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + female = { + tshirt_1 = 35, + tshirt_2 = 0, + torso_1 = 48, + torso_2 = 0, + decals_1 = 7, + decals_2 = 3, + arms = 44, + pants_1 = 34, + pants_2 = 0, + shoes_1 = 27, + shoes_2 = 0, + helmet_1 = -1, + helmet_2 = 0, + chain_1 = 0, + chain_2 = 0, + ears_1 = 2, + ears_2 = 0, + }, + }, + + bullet_wear = { + male = { + bproof_1 = 11, + bproof_2 = 1, + }, + female = { + bproof_1 = 13, + bproof_2 = 1, + }, + }, + + gilet_wear = { + male = { + tshirt_1 = 59, + tshirt_2 = 1, + }, + female = { + tshirt_1 = 36, + tshirt_2 = 1, + }, + }, } diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_policejob/fxmanifest.lua index 30f5842aa..2a8d0ca9b 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/fxmanifest.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/fxmanifest.lua @@ -4,7 +4,7 @@ game("gta5") description("Allows Players to RP as Police Officers (cars, outfits, handcuffing etc)") lua54("yes") -version("1.0.2") +version("1.0.3") shared_script("@es_extended/imports.lua") diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/locales/en.lua b/server-data/resources/[bpt_addons]/bpt_policejob/locales/en.lua index e4b8c3fdf..0f55a26ec 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/locales/en.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/locales/en.lua @@ -1,168 +1,168 @@ Locales["en"] = { - -- Cloakroom - ["cloakroom"] = "locker room", - ["citizen_wear"] = "civilian Outfit", - ["police_wear"] = "police Outfit", - ["gilet_wear"] = "orange reflective jacket", - ["bullet_wear"] = "bulletproof vest", - ["no_outfit"] = "there's no uniform that fits you!", - ["open_cloackroom"] = "press [E] to change clothes.", - -- Armory - ["remove_object"] = "withdraw object", - ["deposit_object"] = "deposit object", - ["get_weapon"] = "withdraw weapon from armory", - ["put_weapon"] = "store weapon in armory", - ["buy_weapons"] = "buy weapons", - ["armory"] = "armory", - ["open_armory"] = "press [E] to access the Armory.", - ["armory_owned"] = "owned", - ["armory_free"] = "free", - ["armory_item"] = "$%s", - ["armory_weapontitle"] = "armory - Buy weapon", - ["armory_componenttitle"] = "armory - Weapon attatchments", - ["armory_bought"] = "you bought an %s for $%s", - ["armory_money"] = "you cannot afford that weapon", - ["armory_hascomponent"] = "you have that attatchment equiped!", - ["get_weapon_menu"] = "armory - Withdraw Weapon", - ["put_weapon_menu"] = "armory - Store Weapon", - ["confirm"] = "Confirm", - -- Vehicles - ["vehicle_menu"] = "vehicle", - ["vehicle_blocked"] = "all available spawn points are currently blocked!", - ["garage_prompt"] = "press [E] to access the Vehicle Actions.", - ["garage_title"] = "vehicle Actions", - ["garage_stored"] = "stored", - ["garage_notstored"] = "not in garage", - ["garage_storing"] = "we're attempting to remove the vehicle, make sure no players are around it.", - ["garage_has_stored"] = "the vehicle has been stored in your garage", - ["garage_has_notstored"] = "no nearby owned vehicles were found", - ["garage_notavailable"] = "your vehicle is not stored in the garage.", - ["garage_blocked"] = "there's no available spawn points!", - ["garage_empty"] = "you don't have any vehicles in your garage.", - ["garage_released"] = "your vehicle has been released from the garage.", - ["garage_store_nearby"] = "there is no nearby vehicles.", - ["garage_storeditem"] = "open garage", - ["garage_storeitem"] = "store vehicle in garage", - ["garage_buyitem"] = "vehicle shop", - ["garage_notauthorized"] = "you're not authorized to buy this kind of vehicles.", - ["helicopter_prompt"] = "press [E] to access the Helicopter Actions.", - ["shop_item"] = "$%s", - ["vehicleshop_title"] = "vehicle Shop", - ["vehicleshop_confirm"] = "do you want to buy this vehicle?", - ["vehicleshop_bought"] = "you have bought %s for ~r~$%s", - ["vehicleshop_money"] = "you cannot afford that vehicle", - ["vehicleshop_awaiting_model"] = "the vehicle is currently DOWNLOADING & LOADING please wait", - ["confirm_no"] = "no", - ["confirm_yes"] = "yes", - ["view"] = "View", - ["buy_car"] = "Buy", - ["stop_view"] = "Stop Viewing", - -- Service - ["service_max"] = "you cannot enter service, max officers in service: %s/%s", - ["service_not"] = "you have not entered service! You'll have to get changed first.", - ["service_anonunce"] = "service information", - ["service_in"] = "you've entered service, welcome!", - ["service_in_announce"] = "operator %s has entered service!", - ["service_out"] = "you have left service.", - ["service_out_announce"] = "operator %s has left their service.", - -- Action Menu - ["menu_title"] = "Police", - ["citizen_interaction"] = "citizen Interaction", - ["vehicle_interaction"] = "vehicle Interaction", - ["object_spawner"] = "object Spawner", - ["id_card"] = "ID Card", - ["search"] = "search", - ["handcuff"] = "cuff / Uncuff", - ["drag"] = "escort", - ["put_in_vehicle"] = "put in Vehicle", - ["out_the_vehicle"] = "drag out from vehicle", - ["fine"] = "fine", - ["unpaid_bills"] = "manage unpaid bills", - ["license_check"] = "manage license", - ["license_revoke"] = "revoke license", - ["license_revoked"] = "your %s has been revoked!", - ["licence_you_revoked"] = "you revoked a %s which belonged to %s", - ["no_players_nearby"] = "there is no player(s) nearby!", - ["being_searched"] = "you are being searched by the Police", - -- Vehicle interaction - ["vehicle_info"] = "vehicle Info", - ["pick_lock"] = "lockpick Vehicle", - ["vehicle_unlocked"] = "vehicle Unlocked", - ["no_vehicles_nearby"] = "there is no vehicles nearby", - ["impound"] = "impound vehicle", - ["impound_prompt"] = "press [E] to cancel the impound", - ["impound_canceled"] = "you canceled the impound", - ["impound_canceled_moved"] = "the impound has been canceled because the vehicle moved", - ["impound_successful"] = "you have impounded the vehicle", - ["search_database"] = "vehicle information", - ["search_database_title"] = "vehicle information - search with registration number", - ["search_database_error_invalid"] = "that is ~r~not a valid registration number", - ["search_plate"] = "Enter Plate", - ["lookup_plate"] = "Lookup Plate", - -- Traffic interaction - ["traffic_interaction"] = "interaction Traffic", - ["cone"] = "cone", - ["barrier"] = "barrier", - ["spikestrips"] = "spikestrips", - ["box"] = "box", - ["cash"] = "box of cash", - -- ID Card Menu - ["name"] = "name: %s", - ["job"] = "job: %s", - ["sex"] = "sex: %s", - ["dob"] = "DOB: %s", - ["height"] = "height: %s", - ["bac"] = "BAC: %s", - ["unknown"] = "unknown", - ["male"] = "male", - ["female"] = "female", - -- Body Search Menu - ["guns_label"] = "--- Guns ---", - ["inventory_label"] = "--- Inventory ---", - ["license_label"] = " --- Licenses ---", - ["confiscate"] = "confiscate %s", - ["confiscate_weapon"] = "confiscate %s with %s bullets", - ["confiscate_inv"] = "confiscate %sx %s", - ["confiscate_dirty"] = 'confiscate dirty money: $%s', - ["you_confiscated"] = "you confiscated %sx %s from %s", - ["got_confiscated"] = "%sx %s were confiscated by %s", - ["you_confiscated_account"] = "you confiscated $%s (%s) from %s", - ["got_confiscated_account"] = "$%s (%s) was confiscated by %s", - ["you_confiscated_weapon"] = "you confiscated %s from %s with ~o~%s bullets", - ["got_confiscated_weapon"] = "your %s with ~o~%s bullets was confiscated by %s", - ["traffic_offense"] = "traffic Offense", - ["minor_offense"] = "minor Offense", - ["average_offense"] = "average Offense", - ["major_offense"] = "major Offense", - ["fine_total"] = "fine: %s", - ["fine_enter_amount"] = "Enter the amount of the fine", - ["fine_enter_text"] = "Enter the reason for the fine", - ["invalid_amount"] = "Error: Amount was not a number or invalid", - -- Vehicle Info Menu - ["plate"] = "plate: %s", - ["owner_unknown"] = "owner: Unknown", - ["owner"] = "owner: %s", - -- Boss Menu - ["open_bossmenu"] = "press [E] to open the menu", - ["quantity_invalid"] = "invalid quantity", - ["have_withdrawn"] = "you have withdrawn %sx %s", - ["have_deposited"] = "you have deposited %sx %s", - ["quantity"] = "quantity", - ["quantity_placeholder"] = "Amount to withdraw..", - ["inventory"] = "inventory", - ["police_stock"] = "police Stock", - -- Misc - ["remove_prop"] = "press [E] to delete the object", - ["map_blip"] = "police Station", - ["unrestrained_timer"] = "you feel your handcuffs slowly losing grip and fading away.", - -- Notifications - ["alert_police"] = "police alert", - ["phone_police"] = "police", - -- Keybind - ["interaction"] = "Interact", - ["quick_actions"] = "Quick Actions", - -- Other - ["society_police"] = "Police", - ["received_firearms_license"] = "You have received your firearms license", - ["released_gun_licence"] = "you have issued your gun licence", + -- Cloakroom + ["cloakroom"] = "locker room", + ["citizen_wear"] = "civilian Outfit", + ["police_wear"] = "police Outfit", + ["gilet_wear"] = "orange reflective jacket", + ["bullet_wear"] = "bulletproof vest", + ["no_outfit"] = "there's no uniform that fits you!", + ["open_cloackroom"] = "press [E] to change clothes.", + -- Armory + ["remove_object"] = "withdraw object", + ["deposit_object"] = "deposit object", + ["get_weapon"] = "withdraw weapon from armory", + ["put_weapon"] = "store weapon in armory", + ["buy_weapons"] = "buy weapons", + ["armory"] = "armory", + ["open_armory"] = "press [E] to access the Armory.", + ["armory_owned"] = "owned", + ["armory_free"] = "free", + ["armory_item"] = "$%s", + ["armory_weapontitle"] = "armory - Buy weapon", + ["armory_componenttitle"] = "armory - Weapon attatchments", + ["armory_bought"] = "you bought an %s for $%s", + ["armory_money"] = "you cannot afford that weapon", + ["armory_hascomponent"] = "you have that attatchment equiped!", + ["get_weapon_menu"] = "armory - Withdraw Weapon", + ["put_weapon_menu"] = "armory - Store Weapon", + ["confirm"] = "Confirm", + -- Vehicles + ["vehicle_menu"] = "vehicle", + ["vehicle_blocked"] = "all available spawn points are currently blocked!", + ["garage_prompt"] = "press [E] to access the Vehicle Actions.", + ["garage_title"] = "vehicle Actions", + ["garage_stored"] = "stored", + ["garage_notstored"] = "not in garage", + ["garage_storing"] = "we're attempting to remove the vehicle, make sure no players are around it.", + ["garage_has_stored"] = "the vehicle has been stored in your garage", + ["garage_has_notstored"] = "no nearby owned vehicles were found", + ["garage_notavailable"] = "your vehicle is not stored in the garage.", + ["garage_blocked"] = "there's no available spawn points!", + ["garage_empty"] = "you don't have any vehicles in your garage.", + ["garage_released"] = "your vehicle has been released from the garage.", + ["garage_store_nearby"] = "there is no nearby vehicles.", + ["garage_storeditem"] = "open garage", + ["garage_storeitem"] = "store vehicle in garage", + ["garage_buyitem"] = "vehicle shop", + ["garage_notauthorized"] = "you're not authorized to buy this kind of vehicles.", + ["helicopter_prompt"] = "press [E] to access the Helicopter Actions.", + ["shop_item"] = "$%s", + ["vehicleshop_title"] = "vehicle Shop", + ["vehicleshop_confirm"] = "do you want to buy this vehicle?", + ["vehicleshop_bought"] = "you have bought %s for ~r~$%s", + ["vehicleshop_money"] = "you cannot afford that vehicle", + ["vehicleshop_awaiting_model"] = "the vehicle is currently DOWNLOADING & LOADING please wait", + ["confirm_no"] = "no", + ["confirm_yes"] = "yes", + ["view"] = "View", + ["buy_car"] = "Buy", + ["stop_view"] = "Stop Viewing", + -- Service + ["service_max"] = "you cannot enter service, max officers in service: %s/%s", + ["service_not"] = "you have not entered service! You'll have to get changed first.", + ["service_anonunce"] = "service information", + ["service_in"] = "you've entered service, welcome!", + ["service_in_announce"] = "operator %s has entered service!", + ["service_out"] = "you have left service.", + ["service_out_announce"] = "operator %s has left their service.", + -- Action Menu + ["menu_title"] = "Police", + ["citizen_interaction"] = "citizen Interaction", + ["vehicle_interaction"] = "vehicle Interaction", + ["object_spawner"] = "object Spawner", + ["id_card"] = "ID Card", + ["search"] = "search", + ["handcuff"] = "cuff / Uncuff", + ["drag"] = "escort", + ["put_in_vehicle"] = "put in Vehicle", + ["out_the_vehicle"] = "drag out from vehicle", + ["fine"] = "fine", + ["unpaid_bills"] = "manage unpaid bills", + ["license_check"] = "manage license", + ["license_revoke"] = "revoke license", + ["license_revoked"] = "your %s has been revoked!", + ["licence_you_revoked"] = "you revoked a %s which belonged to %s", + ["no_players_nearby"] = "there is no player(s) nearby!", + ["being_searched"] = "you are being searched by the Police", + -- Vehicle interaction + ["vehicle_info"] = "vehicle Info", + ["pick_lock"] = "lockpick Vehicle", + ["vehicle_unlocked"] = "vehicle Unlocked", + ["no_vehicles_nearby"] = "there is no vehicles nearby", + ["impound"] = "impound vehicle", + ["impound_prompt"] = "press [E] to cancel the impound", + ["impound_canceled"] = "you canceled the impound", + ["impound_canceled_moved"] = "the impound has been canceled because the vehicle moved", + ["impound_successful"] = "you have impounded the vehicle", + ["search_database"] = "vehicle information", + ["search_database_title"] = "vehicle information - search with registration number", + ["search_database_error_invalid"] = "that is ~r~not a valid registration number", + ["search_plate"] = "Enter Plate", + ["lookup_plate"] = "Lookup Plate", + -- Traffic interaction + ["traffic_interaction"] = "interaction Traffic", + ["cone"] = "cone", + ["barrier"] = "barrier", + ["spikestrips"] = "spikestrips", + ["box"] = "box", + ["cash"] = "box of cash", + -- ID Card Menu + ["name"] = "name: %s", + ["job"] = "job: %s", + ["sex"] = "sex: %s", + ["dob"] = "DOB: %s", + ["height"] = "height: %s", + ["bac"] = "BAC: %s", + ["unknown"] = "unknown", + ["male"] = "male", + ["female"] = "female", + -- Body Search Menu + ["guns_label"] = "--- Guns ---", + ["inventory_label"] = "--- Inventory ---", + ["license_label"] = " --- Licenses ---", + ["confiscate"] = "confiscate %s", + ["confiscate_weapon"] = "confiscate %s with %s bullets", + ["confiscate_inv"] = "confiscate %sx %s", + ["confiscate_dirty"] = 'confiscate dirty money: $%s', + ["you_confiscated"] = "you confiscated %sx %s from %s", + ["got_confiscated"] = "%sx %s were confiscated by %s", + ["you_confiscated_account"] = "you confiscated $%s (%s) from %s", + ["got_confiscated_account"] = "$%s (%s) was confiscated by %s", + ["you_confiscated_weapon"] = "you confiscated %s from %s with ~o~%s bullets", + ["got_confiscated_weapon"] = "your %s with ~o~%s bullets was confiscated by %s", + ["traffic_offense"] = "traffic Offense", + ["minor_offense"] = "minor Offense", + ["average_offense"] = "average Offense", + ["major_offense"] = "major Offense", + ["fine_total"] = "fine: %s", + ["fine_enter_amount"] = "Enter the amount of the fine", + ["fine_enter_text"] = "Enter the reason for the fine", + ["invalid_amount"] = "Error: Amount was not a number or invalid", + -- Vehicle Info Menu + ["plate"] = "plate: %s", + ["owner_unknown"] = "owner: Unknown", + ["owner"] = "owner: %s", + -- Boss Menu + ["open_bossmenu"] = "press [E] to open the menu", + ["quantity_invalid"] = "invalid quantity", + ["have_withdrawn"] = "you have withdrawn %sx %s", + ["have_deposited"] = "you have deposited %sx %s", + ["quantity"] = "quantity", + ["quantity_placeholder"] = "Amount to withdraw..", + ["inventory"] = "inventory", + ["police_stock"] = "police Stock", + -- Misc + ["remove_prop"] = "press [E] to delete the object", + ["map_blip"] = "police Station", + ["unrestrained_timer"] = "you feel your handcuffs slowly losing grip and fading away.", + -- Notifications + ["alert_police"] = "police alert", + ["phone_police"] = "police", + -- Keybind + ["interaction"] = "Interact", + ["quick_actions"] = "Quick Actions", + -- Other + ["society_police"] = "Police", + ["received_firearms_license"] = "You have received your firearms license", + ["released_gun_licence"] = "you have issued your gun licence", } diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/server/main.lua b/server-data/resources/[bpt_addons]/bpt_policejob/server/main.lua index 7679ccd2b..aaebdde51 100644 --- a/server-data/resources/[bpt_addons]/bpt_policejob/server/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_policejob/server/main.lua @@ -1,3 +1,5 @@ +---@diagnostic disable: undefined-global + if Config.EnableESXService then if Config.MaxInService ~= -1 then TriggerEvent("esx_service:activateService", "police", Config.MaxInService) @@ -309,55 +311,6 @@ ESX.RegisterServerCallback("bpt_policejob:removeArmoryWeapon", function(source, end) end) -ESX.RegisterServerCallback("bpt_policejob:buyWeapon", function(source, cb, weaponName, type, componentNum) - local xPlayer = ESX.GetPlayerFromId(source) - local authorizedWeapons, selectedWeapon = Config.AuthorizedWeapons[xPlayer.job.grade_name] - - for k, v in ipairs(authorizedWeapons) do - if v.weapon == weaponName then - selectedWeapon = v - break - end - end - - if not selectedWeapon then - print(("[^3WARNING^7] Player ^5%s^7 Attempted To Buy Invalid Weapon - ^5%s^7!"):format(source, weaponName)) - cb(false) - else - -- Weapon - if type == 1 then - if xPlayer.getMoney() >= selectedWeapon.price then - xPlayer.removeMoney(selectedWeapon.price, "Weapon Bought") - xPlayer.addWeapon(weaponName, 100) - - cb(true) - else - cb(false) - end - - -- Weapon Component - elseif type == 2 then - local price = selectedWeapon.components[componentNum] - local weaponNum, weapon = ESX.GetWeapon(weaponName) - local component = weapon.components[componentNum] - - if component then - if xPlayer.getMoney() >= price then - xPlayer.removeMoney(price, "Weapon Component Bought") - xPlayer.addWeaponComponent(weaponName, component.name) - - cb(true) - else - cb(false) - end - else - print(("[^3WARNING^7] Player ^5%s^7 Attempted To Buy Invalid Weapon Component - ^5%s^7!"):format(source, componentNum)) - cb(false) - end - end - end -end) - ESX.RegisterServerCallback("bpt_policejob:buyJobVehicle", function(source, cb, vehicleProps, type) local xPlayer = ESX.GetPlayerFromId(source) local price = GetPriceFromHash(vehicleProps.model, xPlayer.job.grade_name, type) @@ -423,18 +376,6 @@ ESX.RegisterServerCallback("bpt_policejob:getPlayerInventory", function(source, cb({ items = items }) end) -AddEventHandler("playerDropped", function() - local playerId = source - if playerId then - local xPlayer = ESX.GetPlayerFromId(playerId) - - if xPlayer and xPlayer.job.name == "police" then - Wait(5000) - TriggerClientEvent("bpt_policejob:updateBlip", -1) - end - end -end) - RegisterNetEvent("bpt_policejob:spawned") AddEventHandler("bpt_policejob:spawned", function() local playerId = source diff --git a/server-data/resources/[esx_addons]/alv_repairtable/LICENSE b/server-data/resources/[esx_addons]/alv_repairtable/LICENSE new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/server-data/resources/[esx_addons]/alv_repairtable/README.md b/server-data/resources/[esx_addons]/alv_repairtable/README.md new file mode 100644 index 000000000..ce918f5cf --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/README.md @@ -0,0 +1,46 @@ +

Alv Repair Table

+ +

This is a FiveM script that uses ESX/QBCore/OXCore and OX Inventory to allow players to fix guns by restoring their durability at a crafting bench in exchange for metal.

+ +

The script is heavily configurable and has features such as progress bars, animations & props, etc.

+ +

Script Preview: Alv.gg YouTube

+ +

Installing this to your server.

+ +

+ Please ensure you install a release version as if it is not, you may get a version that is actively being worked on and may error.

+ 1. Download this repository and add the script to your resources folder.
+ 2. Make sure the resource is started in the server.cfg, you can add ensure alv_repairtable if it isn't.
+ 3. Make sure you add the item in the config.lua file to ox_inventory, if you need help with this see below...
+ 4. Once you have completed those steps, the script is ready to be used simply restart your server and you are good to go!
+

+ +

Adding the item to OX Inventory.

+ +

+ 1. Navigate to your ox_inventory folder and open it, then open the data folder and finally open items.lua.
+ 2. Within the items table, add the following code: ['scrapmetal'] = { label = 'Scrap Metal', weight = 80, },
+ 3. Save the file and restart your server, the item is now added to your server.
+

+ +

Have a suggestion?.

+ +

+ Whether it be as simple as adding a new language to the locales or updating an actual feature within the script, we appreciate all feedback and try to accomodate to all server owners' needs.
+ Therefore, if you have a suggestion please join the Discord linked below at the bottom of this README file and leave your comment in the suggestions channel. +

+ +

Experienced Developer? Try this!.

+ +

+ If you want to have the best performance possible and you understand at least the basics of developing, you could also head to the framework.lua on both the client side and server side, remove all of the code there and add a shared script to the fxmanifest.lua with your frameworks import file, if it supports one. The frameworks in here by default all support imports.

+

+ +

Need Support?

+ +

+ I will offer support in my Community Discord, which can be found below as previously mentioned, if you need help with the script you can type in my general chat or makea ticket. Keep in mind that I am not available 24/7 so your response time may vary. You are welcome to ping me with your request to get a better chance of me seeing your message sooner!

+

+ +

If you are looking for a Developer with over 3 years of experience on FiveM, feel free to join my Discord Server or visit my Website!

diff --git a/server-data/resources/[esx_addons]/alv_repairtable/client/client.lua b/server-data/resources/[esx_addons]/alv_repairtable/client/client.lua new file mode 100644 index 000000000..8db30a6df --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/client/client.lua @@ -0,0 +1,189 @@ +lib.locale() + +for k, v in pairs(Config.RepairLocations) do + local point = lib.points.new({ + coords = v.Location, + distance = 2.0, + dunak = v.Label, + }) + + if Config.DrawMarker then + function point:nearby() + DrawMarker(2, v.Location, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.25, 0.15, 200, 30, 30, 200, false, true, 2, nil, nil, false) + end + end + + if Config.Framework.Target then + function point:onEnter() + repair_bench_target = exports.ox_target:addSphereZone({ + coords = v.Location, + radius = Config.Framework.Radius, + debug = Config.Debug, + options = { + { + name = "alv_repairbench", + icon = Config.Framework.Icon, + label = v.Label, + onSelect = function() + repairBench() + end, + }, + }, + }) + end + end + + function point:onExit() + if lib.getOpenMenu() == "repair_bench" then + lib.hideMenu() + end + + if Config.Framework.Target then + exports.ox_target:removeZone(repair_bench_target) + end + end +end + +function repairBench(portable) + local failAttempts = 0 + local Weapons = {} + local location = nil + + if not portable then + for k, v in pairs(Config.RepairLocations) do + if #(GetEntityCoords(cache.ped) - v.Location) > 3.0 then + failAttempts = failAttempts + 1 + location = v.Label + + if failAttempts >= #Config.RepairLocations then + return + end + end + end + end + + local allowed = portable or lib.callback.await("alv_repairtable:canUse", false) + + if allowed then + local loadout = lib.callback.await("alv_repairtable:getLoadout", false) + + for k, v in pairs(loadout) do + if string.find(v.name, "WEAPON_") then + if Config.RestrictedTo and Config.RestrictedTo[v.name] then + Weapons[#Weapons + 1] = { label = v.label, description = locale("menu_description", v.label, v.metadata.durability), args = { name = v.name, durability = v.metadata.durability, slot = v.slot } } + elseif Config.RestrictedTo == false then + Weapons[#Weapons + 1] = { label = v.label, description = locale("menu_description", v.label, v.metadata.durability), args = { name = v.name, durability = v.metadata.durability, slot = v.slot } } + end + end + end + + if #Weapons > 0 then + DebugPrint(json.encode(Weapons, { indent = true })) + + BeginMenu(Weapons, location) + else + Config.Notify(locale("no_weapons")) + end + else + Config.Notify(locale("no_job")) + end +end + +if Config.Command and Config.KeyMapping.Enabled then + RegisterCommand("repair_bench", function() + repairBench() + end) +end + +if Config.KeyMapping.Enabled then + RegisterKeyMapping("repair_bench", Config.KeyMapping.Description, "keyboard", Config.Keymapping.Keybind) +end + +RegisterNetEvent("alv_repairtable:placeTable", function() + if Config.TableItem.RequireMetalToPlace then + local hasMetal = lib.callback.await("alv_repairtable:getMetal", false) + + if hasMetal == 0 then + return Config.Notify(locale("no_metal_placing")) + end + end + + if Config.TableItem.Job then + local allowed = lib.callback.await("alv_repairtable:canPlace", false) + + if not allowed then + return Config.Notify(locale("no_job_placing")) + end + end + + if Config.TableItem.TakeOnUse then + lib.callback.await("alv_repairtable:takeTable", false, "place") + end + + local tableHash = GetHashKey(Config.TableItem.Prop) + RequestModel(tableHash) + + while not HasModelLoaded(tableHash) do + Wait(0) + end + + local x, y, z = table.unpack(GetEntityCoords(cache.ped)) + local table = CreateObject(tableHash, x + 2.0, y, z, true, true, true) + PlaceObjectOnGroundProperly(table) + + function DeleteTable() + SetEntityAsMissionEntity(table) + DeleteObject(table) + end + + local table_point = lib.points.new({ + coords = GetEntityCoords(table), + distance = 2.0, + dunake = "nerd", + }) + + function table_point:onEnter() + portable_table = exports.ox_target:addSphereZone({ + coords = GetEntityCoords(table), + radius = Config.Framework.Radius, + debug = Config.Debug, + options = { + { + name = "alv_useBench", + label = locale("use_repair_bench"), + icon = Config.Framework.Icon, + onSelect = function() + repairBench(true) + end, + }, + { + name = "alv_takeBench", + label = locale("pick_bench_up"), + icon = Config.Framework.Icon, + onSelect = function() + DeleteTable() + + if Config.TableItem.TakeOnUse then + lib.callback.await("alv_repairtable:takeTable", false, "pickup") + + exports.ox_target:removeZone(portable_table) + table_point = nil + end + end, + }, + }, + }) + end + + function table_point:onExit() + exports.ox_target:removeZone(portable_table) + end +end) + +AddEventHandler("onResourceStop", function(name) + if name == GetCurrentResourceName() then + if lib.getOpenMenu() == "repair_bench" then + lib.hideMenu() + end + end +end) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/client/framework.lua b/server-data/resources/[esx_addons]/alv_repairtable/client/framework.lua new file mode 100644 index 000000000..38b17b34c --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/client/framework.lua @@ -0,0 +1,14 @@ +CreateThread(function() + if Config.Framework.Type == "auto" then + if GetResourceState("es_extended") ~= "missing" then + ESX = exports["es_extended"]:getSharedObject() + elseif GetResourceState("qb-core") ~= "missing" then + QBCore = exports["qb-core"]:GetCoreObject() + elseif GetResourceState("ox_core") ~= "missing" then + local file = ("imports/%s.lua"):format(IsDuplicityVersion() and "server" or "client") + local import = LoadResourceFile("ox_core", file) + local chunk = assert(load(import, ("@@ox_core/%s"):format(file))) + chunk() + end + end +end) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/client/functions.lua b/server-data/resources/[esx_addons]/alv_repairtable/client/functions.lua new file mode 100644 index 000000000..4682cf94d --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/client/functions.lua @@ -0,0 +1,165 @@ +function DebugPrint(msg) + if Config.Debug then + return print(msg) + end +end + +function BeginMenu(weapons, location) + if Config.MenuOptions.UseMenu then + lib.registerMenu({ + id = "repair_bench", + title = Config.MenuOptions.Title, + position = Config.MenuOptions.Position, + options = weapons, + }, function(selected, scrollIndex, args) + if CanRepair(args.durability) then + BeginRepair(args.slot) + end + end) + + Wait(100) + + if not lib.getOpenMenu() then + lib.showMenu("repair_bench") + end + else + Options = {} + + for k, v in pairs(weapons) do + if type(v) == "table" then + Options[#Options + 1] = { label = v.label, slot = v.args.slot, durability = v.args.durability } + end + end + + SendNUIMessage({ + type = "openui", + data = { + title = locale("weapons_menu_title"), + weapons = Options, + }, + }) + SetNuiFocus(true, true) + end +end + +function CanRepair(durability) + if durability == 100 then + return Config.Notify(locale("no_damage")) + else + local metalCount = lib.callback.await("alv_repairtable:getMetal", false) + + for k, v in pairs(Config.Requirements) do + if durability >= k and metalCount >= v then + local success = lib.callback.await("alv_repairtable:removeMetal", false, v) + + if success then + return true + end + end + end + + return Config.Notify(locale("no_metal")) + end +end + +function BeginRepair(slot) + local slot = slot + + if + lib.progressBar({ + duration = (Config.Repairing.TimeEach * 1000) / 2, + label = locale("repairing_weapon"), + useWhileDead = false, + canCancel = true, + disable = { + car = true, + }, + anim = { + dict = Config.Repairing.Fixing.AnimDict, + clip = Config.Repairing.Fixing.AnimClip, + }, + }) + then + if + lib.progressBar({ + duration = (Config.Repairing.TimeEach * 1000) / 2, + label = locale("cleaning_weapon"), + useWhileDead = false, + canCancel = true, + disable = { + car = true, + }, + anim = { + dict = Config.Repairing.Cleaning.AnimDict, + clip = Config.Repairing.Cleaning.AnimClip, + }, + }) + then + lib.callback("alv_repairtable:repairGun", cache.serverId, function(success) + if success then + Config.Notify(locale("weapon_repaired")) + end + end, slot) + else + Config.Notify(locale("cancelled_repair")) + end + else + Config.Notify(locale("cancelled_repair")) + end +end + +if Config.Debug then + RegisterCommand("test_noti", function() + SendNUIMessage({ + type = "notification", + data = { + message = "Test Notification", + time = 5000, + }, + }) + end) + + RegisterCommand("test_ui", function() + if not LocalPlayer.state.usingTable then + SendNUIMessage({ + type = "openui", + data = { + title = "Repair Bench", + weapons = { + { + label = "Pistol", + slot = 1, + durability = 17.38, + }, + { + label = "AP Pistol", + slot = 2, + durability = 19.21, + }, + }, + }, + }) + SetNuiFocus(true, true) + LocalPlayer.state.usingTable = true + else + SendNUIMessage({ + type = "closeui", + }) + SetNuiFocus(false, false) + LocalPlayer.state.usingTable = false + end + end) +end + +RegisterNUICallback("CloseMenu", function() + LocalPlayer.state.usingTable = false + SetNuiFocus(false, false) +end) + +RegisterNUICallback("BeginRepair", function(data, cb) + local durability = lib.callback.await("alv_repairbench:getDurability", false, data.slot) + + if CanRepair(durability) then + BeginRepair(data.slot) + end +end) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/config.lua b/server-data/resources/[esx_addons]/alv_repairtable/config.lua new file mode 100644 index 000000000..c09d075b6 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/config.lua @@ -0,0 +1,104 @@ +Config = {} + +Config.CheckVersion = false -- Will let you know in your console if the script is up to date and will let you know of any changelogs and things that are coming soon. + +Config.MetalItem = "steel" -- The item required to repair weapons. +Config.ChargePlayer = 5000 -- Set this to false to make it free to repair weapons. +Config.DrawMarker = false -- You may want to disable this if using third-eye (target). +Config.Command = true -- If you want to use Key Mapping, Pressing E, etc. THIS MUST BE ENABLED.... + +Config.TableItem = { + Prop = "prop_tool_bench02", -- The table prop that will be placed... + RequireMetalToPlace = true, -- Enabling this requires the player to have the MetalItem to place. + Job = true, -- Replace false with a job if you want only specific jobs to place a table. + TakeOnUse = true, +} + +Config.KeyMapping = { + Enabled = false, -- You'll want to disable keybinds if you're using the third eye. + Description = "Use a repair bench.", -- Description that will show in the FiveM keybind settings. + Keybind = "e", -- The key that the repair bench will be binded to, the default and recommended is E. +} + +Config.Framework = { + Type = "auto", --[[ Options: 'auto', 'esx', 'qb', 'ox' ]] -- + Name = "es_extended", --[[ Name of your frameworks core resource for the export. ]] -- + Target = GetResourceState("ox_target") ~= "missing", -- Will determine if you have ox_target, but you can set this to false to completely disable. + Radius = 1.0, -- The radius for the target, if enabled. + Icon = "fa-solid fa-gun", -- Icon that will appear on the target. +} + +Config.RepairLocations = { + [1] = { + Location = vec3(808.945068, -2173.318604, 29.616821), -- The coordinates for the bench (vector3) + Label = "Ammu Repair Bench", -- Label for the location you're at. + Jobs = { + ["ammu"] = true, -- Job required to operate the table, feel free to add more by adding a new line. + }, + }, +} + +Config.RestrictedTo = { -- Remove the table and set this to false to allow every gun on the table + ["WEAPON_APPISTOL"] = true, + ["WEAPON_PISTOL"] = true, +} + +-- EXAMPLE TO ALLOW ALL GUNS BELOW. REPLACE LINES 26-30 WITH THIS IF THATS WHAT YOU WANT. + +--[[ +Config.RestrictedTo = {} +]] + +Config.Repairing = { + InstantRepair = false, -- Do you want the weapon to repair instantly? Setting to false will use a progress bar and optional animation. + TimeEach = 5, -- How long each stage should take in seconds, default is 150 seconds meaning it takes 5 minutes to repeir a weapon. + Fixing = { + AnimDict = "anim@heists@prison_heiststation@cop_reactions", + AnimClip = "cop_b_idle", + }, + Cleaning = { + AnimDict = "timetable@floyd@clean_kitchen@base", + AnimClip = "base", + }, +} + +Config.Requirements = { -- The amount of metal required to fix a gun based on its durability. + [99.9] = 1, + [75] = 3, + [50] = 6, + [25] = 9, + [10] = 12, + [5] = 14, + [0] = 15, +} + +Config.MenuOptions = { + UseMenu = false, -- --[[ OPTIONS: true (will use ox_lib menu), false (will use built-in UI) ]]-- + Title = "Repair Bench", -- Will show in the menu header. + Position = "bottom-right", -- Menu position, read ox_lib docs for more positions. +} + +Config.Notification = "built-in" --[[ OPTIONS: 'built-in', 'framework', 'print', none ]] -- +function Config.Notify(message) + if Config.Notification == "built-in" then + SendNUIMessage({ + type = "notification", + data = { + message = message, + time = 5000, + }, + }) + elseif Config.Notification == "framework" then + if ESX then + ESX.ShowNotification(message) + elseif QBCore then + QBCore.Funcions.Notify(message) + end + elseif Config.Notification == "print" then + print(message) + else + return + end +end + +Config.Debug = false -- Will print data you can use for debugging if you modify the script, also registers some commands that'll help you test stuff. See functions file for more information. diff --git a/server-data/resources/[esx_addons]/alv_repairtable/discord.lua b/server-data/resources/[esx_addons]/alv_repairtable/discord.lua new file mode 100644 index 000000000..d4d7671f6 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/discord.lua @@ -0,0 +1,7 @@ +Discord = {} + +Discord.Color = 16711680 +Discord.Username = "Alv.gg" +Discord.AvatarUrl = "https://avatars.githubusercontent.com/u/72032190?v=4" + +Discord.RepairWebhook = "" diff --git a/server-data/resources/[esx_addons]/alv_repairtable/fxmanifest.lua b/server-data/resources/[esx_addons]/alv_repairtable/fxmanifest.lua new file mode 100644 index 000000000..f35c60d6d --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/fxmanifest.lua @@ -0,0 +1,33 @@ +fx_version("cerulean") +game("gta5") +lua54("yes") + +author("Alv") +description("OX Inventory Repair Table for guns.") +url("https://alv.gg") +version("1.1.1") + +shared_scripts({ + "@ox_lib/init.lua", + "config.lua", +}) + +client_scripts({ + "client/*.lua", +}) + +server_scripts({ + "@oxmysql/lib/MySQL.lua", + "discord.lua", + "server/*.lua", +}) + +ui_page("html/index.html") + +files({ + "locales/*.json", + "html/img/*.png", + "html/index.html", + "html/style.css", + "html/script.js", +}) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/html/img/glock.png b/server-data/resources/[esx_addons]/alv_repairtable/html/img/glock.png new file mode 100644 index 000000000..4802c4c3b Binary files /dev/null and b/server-data/resources/[esx_addons]/alv_repairtable/html/img/glock.png differ diff --git a/server-data/resources/[esx_addons]/alv_repairtable/html/index.html b/server-data/resources/[esx_addons]/alv_repairtable/html/index.html new file mode 100644 index 000000000..92776ee4e --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/html/index.html @@ -0,0 +1,28 @@ + + + + + + + + + Alv Repair Table + + + + + +
+ +
+

Repair Table

+ + + +
+
+ + + + + \ No newline at end of file diff --git a/server-data/resources/[esx_addons]/alv_repairtable/html/script.js b/server-data/resources/[esx_addons]/alv_repairtable/html/script.js new file mode 100644 index 000000000..d6eac14ca --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/html/script.js @@ -0,0 +1,78 @@ +const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); + +window.addEventListener('message', function(event) { + if (event.data.type === 'notification') { + const notification = document.getElementById('notification'); + + notification.style.display = 'block'; + notification.style.opacity = 1.0; + notification.innerHTML = event.data.data.message; + + sleep(event.data.data.time).then(() => { + notification.style.opacity = 0.75; + sleep(333).then(() => { + notification.style.opacity = 0.5; + sleep(333).then(() => { + notification.style.opacity = 0.25; + // eslint-disable-next-line max-nested-callbacks + sleep(333).then(() => { + notification.style.display = 'none'; + }); + }); + }); + }); + } + else if (event.data.type === 'openui') { + if (event.data.data.weapons) { + // eslint-disable-next-line no-var + var ui = document.getElementById('ui_main'); + ui.style.display = 'block'; + const ui_header = document.getElementById('ui_header'); + ui_header.innerHTML = event.data.data.title; + // eslint-disable-next-line no-var, no-redeclare + var ui = document.getElementById('ui_main'); + + const ui_weapons = document.getElementById('ui_weapons'); + + event.data.data.weapons.forEach(function(k) { + const br = []; + const button = document.createElement('button'); + button.innerHTML = `${k.label} (${k.durability}%)`; + button.value = k.slot; + button.onclick = function() { + weaponPressed(k.slot); + }; + ui_weapons.appendChild(button); + for (let i = 0; i < 2; i++) { + br[i] = document.createElement('br'); + ui_weapons.appendChild(br[i]); + } + }); + } + } + else if (event.data.type === 'closeui') { + deleteMenu(); + } +}); + +function deleteMenu() { + const ui = document.getElementById('ui_main'); + ui.style.display = 'none'; + + const ui_weapons = document.getElementById('ui_weapons'); + ui_weapons.remove(); + + const new_ui = document.createElement('table'); + new_ui.id = 'ui_weapons'; + ui.appendChild(new_ui); + + $.post(`https://${GetParentResourceName()}/CloseMenu`); +} + +function weaponPressed(value) { + deleteMenu(); + + $.post(`https://${GetParentResourceName()}/BeginRepair`, JSON.stringify({ + slot: value, + })); +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/html/style.css b/server-data/resources/[esx_addons]/alv_repairtable/html/style.css new file mode 100644 index 000000000..f5d18d98b --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/html/style.css @@ -0,0 +1,87 @@ +@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap'); + +body { + width: 100%; + height: 100%; + font-family: Ubuntu; + overflow: hidden; +} + +#notification { + display: none; + position: absolute; + border-radius: 6px; + background: rgba(30, 30, 30, 0.6); + color: rgb(255, 255, 255); + border-bottom: 2px solid rgb(0, 150, 255); + left: 90%; + top: 45%; + padding: 10px; + text-align: center; + width: 150px; + opacity: 1; + animation: fade 2s linear; +} + +@keyframes fade { + 0% { opacity: 0 } + 50% { opacity: 0.5 } + 100% { opacity: 1.0 } +} + +#ui_main { + display: none; + position: absolute; + left: 30%; + top: 25%; + text-align: center; + align-items: center; + translate: calc(50%, -50%); + width: 40%; + height: 60%; + border: none; + border-bottom: 3px solid red; + border-top: 3px solid red; + background: url('https://cdn.steamstatic.com/steamcommunity/public/images/items/691320/f25982e19fd4d1d674b434f546548d3cdf96e936.jpg'); + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; + border-radius: 20px; + color: white; + font-size: 20px; + user-select: none; +} + +#ui_weapons button { + margin: 0; + position: absolute; + left: 50%; + -ms-transform: translateX(-50%); + transform: translateX(-50%); + padding: 6px; + border: none; + width: 25%; + height: 7%; + font-size: 17px; + border-bottom: 2px solid red; + background: rgba(100, 100, 100, 0.6); + border-radius: 6px; + color: white; +} + +#ui_weapons button:hover { + cursor: pointer; +} + +#close-button { + position: absolute; + right: 2%; + top: 2%; + width: 5%; + height: 6%; +} + +#close-button:hover { + cursor: pointer; +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/de.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/de.json new file mode 100644 index 000000000..1cab76704 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/de.json @@ -0,0 +1,13 @@ +{ + "menu_description": "Repariere %s mit verbleibender Haltbarkeit von %s.", + "no_weapons": "Du hast keine Waffen.", + "no_job": "Sie können diese Tabelle nicht verwenden, da Sie nicht über den richtigen Job verfügen.", + "no_damage": "Diese Waffe weist keinen zu reparierenden Schaden auf...", + "no_metal": "Sie haben nicht genug Metall, um diese Waffe zu reparieren.", + "cleaning_weapon": "Waffe reinigen...", + "repairing_weapon": "Waffe reparieren...", + "weapon_repaired": "Waffe repariert.", + "cancelled_repair": "Reparatur abgebrochen...", + "not_found": "Nicht gefunden", + "weapon_repaired_desc": "Name: %s \nServer-ID: %s \nDiscord: %s \nWaffe: %s" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/en.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/en.json new file mode 100644 index 000000000..21b07f29c --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/en.json @@ -0,0 +1,20 @@ +{ + "menu_description": "Repair %s with %s durability left.", + "no_weapons": "You do not have any weapons.", + "no_job": "You cannot use this table as you do not have the correct job.", + "no_damage": "This weapon has no damage to repair...", + "no_metal": "You do not have enough metal to repair this gun.", + "cleaning_weapon": "Cleaning Weapon...", + "repairing_weapon": "Repairing Weapon...", + "weapon_repaired": "Weapon Repaired.", + "cancelled_repair": "Cancelled repair...", + "not_found": "Not Found", + "weapon_repaired_desc": "Name: %s \nServer ID: %s \nDiscord: %s \nWeapon: %s", + "not_enough_money": "You can not afford to repair this weapon.", + "repair_bench": "Weapons Repair Bench", + "no_metal_placing": "You need scrap metal to place the table...", + "no_job_placing": "You cannot place a table as you do not have the correct job...", + "use_repair_bench": "Use Repair Bench", + "pick_bench_up": "Pick Bench Up", + "weapons_menu_title": "Weapons Repair Bench" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/es.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/es.json new file mode 100644 index 000000000..b9007dd52 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/es.json @@ -0,0 +1,13 @@ +{ + "menu_description": "Repara %s con %s de durabilidad restante.", + "no_weapons": "No tienes armas.", + "no_job": "No puede utilizar esta tabla porque no tiene el trabajo correcto.", + "no_damage": "Esta arma no tiene daños que reparar...", + "no_metal": "No tienes suficiente metal para reparar esta arma.", + "cleaning_weapon": "Arma de limpieza...", + "repairing_weapon": "Reparando arma...", + "weapon_repaired": "Arma reparada.", + "cancelled_repair": "Reparación cancelada...", + "not_found": "No encontrado", + "weapon_repaired_desc": "Nombre: %s \nID del servidor: %s \nDiscord: %s \nArma: %s" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/fr.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/fr.json new file mode 100644 index 000000000..02f538428 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/fr.json @@ -0,0 +1,13 @@ +{ + "menu_description": "Réparez %s avec %s de durabilité restante.", + "no_weapons": "Vous n'avez aucune arme.", + "no_job": "Vous ne pouvez pas utiliser ce tableau car vous n'avez pas le bon travail.", + "no_damage": "Cette arme n'a aucun dommage à réparer...", + "no_metal": "Vous n'avez pas assez de métal pour réparer cette arme.", + "cleaning_weapon": "Arme de nettoyage...", + "repairing_weapon": "Réparation d'arme...", + "weapon_repaired": "Arme réparée....", + "cancelled_repair": "Réparation annulée...", + "not_found": "Pas trouvé", + "weapon_repaired_desc": "Nom : %s \nID du serveur : %s \nDiscorde : %s \nArme : %s" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/it.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/it.json new file mode 100644 index 000000000..0e885848e --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/it.json @@ -0,0 +1,13 @@ +{ + "menu_description": "Ripara %s con %s durabilità rimasta.", + "no_weapons": "Non hai armi.", + "no_job": "Non puoi utilizzare questa tabella perché non hai il lavoro corretto.", + "no_damage": "Quest'arma non ha danni da riparare...", + "no_metal": "Non hai abbastanza metallo per riparare questa pistola.", + "cleaning_weapon": "Pulizia dell'arma...", + "repairing_weapon": "Riparazione dell'arma...", + "weapon_repaired": "Arma riparata.", + "cancelled_repair": "Riparazione annullata...", + "not_found": "Non trovato", + "weapon_repaired_desc": "Nome: %s \nID server: %s \nDiscord: %s \nArma: %s" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/locales/nl.json b/server-data/resources/[esx_addons]/alv_repairtable/locales/nl.json new file mode 100644 index 000000000..854731725 --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/locales/nl.json @@ -0,0 +1,13 @@ +{ + "menu_description": "Repareer %s met nog %s duurzaamheid over.", + "no_weapons": "Je hebt geen wapens.", + "no_job": "U kunt deze tabel niet gebruiken omdat u niet de juiste functie heeft.", + "no_damage": "Dit wapen heeft geen schade om te repareren...", + "no_metal": "Je hebt niet genoeg metaal om dit wapen te repareren.", + "cleaning_weapon": "Wapen schoonmaken...", + "repairing_weapon": "Wapen repareren...", + "weapon_repaired": "Wapen gerepareerd.", + "cancelled_repair": "Reparatie geannuleerd...", + "not_found": "Niet gevonden", + "weapon_repaired_desc": "Naam: %s \nServer-ID: %s \nTwijfel: %s \nWapen: %s" +} diff --git a/server-data/resources/[esx_addons]/alv_repairtable/server/framework.lua b/server-data/resources/[esx_addons]/alv_repairtable/server/framework.lua new file mode 100644 index 000000000..38b17b34c --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/server/framework.lua @@ -0,0 +1,14 @@ +CreateThread(function() + if Config.Framework.Type == "auto" then + if GetResourceState("es_extended") ~= "missing" then + ESX = exports["es_extended"]:getSharedObject() + elseif GetResourceState("qb-core") ~= "missing" then + QBCore = exports["qb-core"]:GetCoreObject() + elseif GetResourceState("ox_core") ~= "missing" then + local file = ("imports/%s.lua"):format(IsDuplicityVersion() and "server" or "client") + local import = LoadResourceFile("ox_core", file) + local chunk = assert(load(import, ("@@ox_core/%s"):format(file))) + chunk() + end + end +end) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/server/functions.lua b/server-data/resources/[esx_addons]/alv_repairtable/server/functions.lua new file mode 100644 index 000000000..3af4ecebc --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/server/functions.lua @@ -0,0 +1,68 @@ +function GetJob(source) + if ESX then + return ESX.GetPlayerFromId(source).getJob().name + elseif QBCore then + local Player = QBCore.Functions.GetPlayer(source) + + return Player.PlayerData.job.name + elseif Ox then + local player = Ox.getPlayer(source) + + return player.getGroup() -- Haven't used OX Core too much before, seeing from documentation that police and sheriff were stored as a group so that's what I'll assume is the job. + end +end + +function ChargePlayer(source, amount) + if ESX then + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeMoney(amount) + elseif QBCore then + local Player = QBCore.Functions.GetPlayer(source) + + Player.Functions.RemoveMoney(amount) + elseif Ox then + -- No money support for Ox setup at current date. + end +end + +function DiscordLog(webhook, title, message, data) + if GetResourceState("alv_lib") == "missing" then + local color, userName, avatarUrl + + if data.color then + color = data.color + else + color = 16711680 + end + if data.username then + userName = data.username + else + username = "Alv.gg" + end + if data.avatarUrl then + avatarUrl = data.avatarUrl + else + avatarUrl = "https://ih1.redbubble.net/image.971270805.6405/gbrf,6x6,f,540x540-pad,450x450,f8f8f8.jpg" + end + + local embed = { + { + ["color"] = color, + ["title"] = title, + ["description"] = message, + ["footer"] = { + ["text"] = "Alv.gg - 2023", + }, + }, + } + + PerformHttpRequest(webhook, function(err, text, headers) end, "POST", json.encode({ username = userName, avatar_url = avatarUrl, embeds = embed }), { ["Content-Type"] = "application/json" }) + else + exports["alv_lib"]:SendLog(webhook, title, message, { + color = Discord.Color, + username = Discord.Username, + avatarUrl = Discord.AvatarURL, + }) + end +end diff --git a/server-data/resources/[esx_addons]/alv_repairtable/server/server.lua b/server-data/resources/[esx_addons]/alv_repairtable/server/server.lua new file mode 100644 index 000000000..cd9e8633c --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/server/server.lua @@ -0,0 +1,77 @@ +local ox_inventory = exports.ox_inventory +lib.locale() + +lib.callback.register("alv_repairtable:canUse", function(source, cb) + for k, v in pairs(Config.RepairLocations) do + if #(v.Location - GetEntityCoords(GetPlayerPed(source))) < 2.0 then + if v.Jobs and type(v.Jobs == "table") and v.Jobs[GetJob(source)] then + return true + end + end + end + + return false +end) + +lib.callback.register("alv_repairtable:getLoadout", function(source, cb) + return ox_inventory:GetInventoryItems(source) +end) + +lib.callback.register("alv_repairtable:getMetal", function(source, cb) + return ox_inventory:GetItem(source, Config.MetalItem, nil, true) +end) + +lib.callback.register("alv_repairtable:chargePlayer", function(source, cb) + return ChargePlayer(source, Config.ChargePlayer) +end) + +lib.callback.register("alv_repairtable:removeMetal", function(source, count) + return ox_inventory:RemoveItem(source, Config.MetalItem, count) +end) + +lib.callback.register("alv_repairtable:returnTable", function(source, count) + ox_inventory:RemoveItem(source, "gun_table", 1) + return true +end) + +lib.callback.register("alv_repairtable:takeTable", function(source, type) + if type == "pickup" then + ox_inventory:AddItem(source, "gun_table", 1) + return true + elseif type == "place" then + ox_inventory:RemoveItem(source, "gun_table", 1) + return true + end +end) + +lib.callback.register("alv_repairtable:repairGun", function(source, slot, cb) + if source and slot then + local slot = tonumber(slot) + ox_inventory:SetDurability(source, slot, 100) + if GetPlayerIdentifierByType(source, "discord") then + local DiscordName = "<@" .. string.sub(GetPlayerIdentifierByType(source, "discord"), 9, -1) .. ">" + else + local DiscordName = locale("not_found") + end + DiscordLog(Discord.RepairWebhook, GetPlayerName(source), DiscordName, locale("weapon_repaired"), locale("repaired_desc", ox_inventory:GetSlot(source, slot))) + + if Config.ChargePlayer then + ChargePlayer(source, Config.ChargePlayer) + end + return true + end +end) + +lib.callback.register("alv_repairbench:getDurability", function(source, slot, cb) + if source and slot then + local slot = tonumber(slot) + + local items = ox_inventory:GetInventoryItems(source) + + for k, v in pairs(items) do + if v.slot == slot then + return v.metadata.durability + end + end + end +end) diff --git a/server-data/resources/[esx_addons]/alv_repairtable/server/version.lua b/server-data/resources/[esx_addons]/alv_repairtable/server/version.lua new file mode 100644 index 000000000..015a1f94a --- /dev/null +++ b/server-data/resources/[esx_addons]/alv_repairtable/server/version.lua @@ -0,0 +1,36 @@ +function mysplit(inputstr, sep) --[[ Function to split a string into an array. ]] + if sep == nil then + sep = "%s" + end + local t = {} + for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do + table.insert(t, str) + end + return t +end + +CreateThread(function() + if Config.CheckVersion then + local version = GetResourceMetadata(GetCurrentResourceName(), "version") + PerformHttpRequest("https://raw.githubusercontent.com/alvwashere/ScriptVersions/master/repairtable_version", function(code, res, headers) + if code == 200 then + local rv = json.decode(res) + if tonumber(table.concat(mysplit(rv.version, "."))) > tonumber(table.concat(mysplit(version, "."))) then + print(([[ +^6[ALV-GG]^0 Repair Table Script Loaded +^6[ALV-GG]^0 The system is ^2NOT^0 up to date. +^6[ALV-GG]^0 Changelog: ^4%s ^0 +]]):format(rv.version, rv.changelog)) + else + print(([[ +^6[ALV-GG]^0 Repair Table Script Loaded +^6[ALV-GG]^0 The system is ^1up to date^0. +^6[ALV-GG]^0 Changelogs: ^4%s ^0 +^6[ALV-GG]^0 Coming Soon: ^4%s ^0 +^6[ALV-GG]^0 Please update here: ^1https://github.com/alvwashere/alv_repairtable/releases^0. +]]):format(rv.version, rv.changelog, rv.coming_soon)) + end + end + end, "GET") + end +end) diff --git a/server-data/resources/[maps]/iak_ammunation/fxmanifest.lua b/server-data/resources/[maps]/iak_ammunation/fxmanifest.lua new file mode 100644 index 000000000..bf2d58515 --- /dev/null +++ b/server-data/resources/[maps]/iak_ammunation/fxmanifest.lua @@ -0,0 +1,7 @@ +fx_version "bodacious" +games { 'rdr3', 'gta5' } +author 'Iakkoise' + +this_is_a_map 'yes' + + diff --git a/server-data/resources/[maps]/iak_ammunation/stream/_manifest.ymf b/server-data/resources/[maps]/iak_ammunation/stream/_manifest.ymf new file mode 100644 index 000000000..cb24234e9 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/_manifest.ymf differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/bkr_id1_09_strm_0.ymap b/server-data/resources/[maps]/iak_ammunation/stream/bkr_id1_09_strm_0.ymap new file mode 100644 index 000000000..5009abb73 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/bkr_id1_09_strm_0.ymap differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/ch_prop_ch_penthousedoor_01a.ydr b/server-data/resources/[maps]/iak_ammunation/stream/ch_prop_ch_penthousedoor_01a.ydr new file mode 100644 index 000000000..771e8b3e3 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/ch_prop_ch_penthousedoor_01a.ydr differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/hei_dt1_rd1_strm_1.ymap b/server-data/resources/[maps]/iak_ammunation/stream/hei_dt1_rd1_strm_1.ymap new file mode 100644 index 000000000..7478c4c0d Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/hei_dt1_rd1_strm_1.ymap differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/hi@v_gun.ybn b/server-data/resources/[maps]/iak_ammunation/stream/hi@v_gun.ybn new file mode 100644 index 000000000..2972e4ca8 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/hi@v_gun.ybn differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell+hidr.ytd b/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell+hidr.ytd new file mode 100644 index 000000000..77b808690 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell+hidr.ytd differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell.ydr b/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell.ydr new file mode 100644 index 000000000..990caecce Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_gc_shell.ydr differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc+hidr.ytd b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc+hidr.ytd new file mode 100644 index 000000000..e7667f024 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc+hidr.ytd differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc.ydr b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc.ydr new file mode 100644 index 000000000..7c9c01bfe Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangemisc.ydr differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys+hidr.ytd b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys+hidr.ytd new file mode 100644 index 000000000..eb51d547d Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys+hidr.ytd differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys.ydr b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys.ydr new file mode 100644 index 000000000..d8d0c033e Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_7_rangeovrlys.ydr differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_gun.ybn b/server-data/resources/[maps]/iak_ammunation/stream/v_gun.ybn new file mode 100644 index 000000000..d54802f7f Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_gun.ybn differ diff --git a/server-data/resources/[maps]/iak_ammunation/stream/v_int_7.ytyp b/server-data/resources/[maps]/iak_ammunation/stream/v_int_7.ytyp new file mode 100644 index 000000000..949db2733 Binary files /dev/null and b/server-data/resources/[maps]/iak_ammunation/stream/v_int_7.ytyp differ diff --git a/server-data/resources/[ox]/ox_inventory/data/items.lua b/server-data/resources/[ox]/ox_inventory/data/items.lua index da1fc6a4b..7e8f4ffe0 100644 --- a/server-data/resources/[ox]/ox_inventory/data/items.lua +++ b/server-data/resources/[ox]/ox_inventory/data/items.lua @@ -18,6 +18,17 @@ return { label = "Tessera parcheggio", }, + ["gun_table"] = { + label = "Gun Table", + weight = 10000, + stack = false, + close = true, + description = "Tavolo portatile da sistemare mentre sei in movimento...", + client = { + event = "alv_repairtable:placeTable", + }, + }, + ["burger"] = { label = "Burger", weight = 220, diff --git a/server-data/resources/[ox]/ox_inventory/web/images/gun_table.png b/server-data/resources/[ox]/ox_inventory/web/images/gun_table.png new file mode 100644 index 000000000..c011bb74e Binary files /dev/null and b/server-data/resources/[ox]/ox_inventory/web/images/gun_table.png differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_game.dat151.rel b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_game.dat151.rel new file mode 100644 index 000000000..1229cba39 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_game.dat151.rel differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_sounds.dat54.rel b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_sounds.dat54.rel new file mode 100644 index 000000000..e570c8195 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tamustanggt50_sounds.dat54.rel differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_game.dat151.rel b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_game.dat151.rel new file mode 100644 index 000000000..1d2ad1285 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_game.dat151.rel differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_sounds.dat54.rel b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_sounds.dat54.rel new file mode 100644 index 000000000..c2d7390aa Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/audioconfig/tascmustanggt50_sounds.dat54.rel differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/fxmanifest.lua b/server-data/resources/[sound_cars]/tamustanggt50/fxmanifest.lua new file mode 100644 index 000000000..47497d5a9 --- /dev/null +++ b/server-data/resources/[sound_cars]/tamustanggt50/fxmanifest.lua @@ -0,0 +1,16 @@ +fx_version 'adamant' + +game 'gta5' + +files { + 'audioconfig/*.dat151.rel', + 'audioconfig/*.dat54.rel', + 'sfx/**/*.awc' +} + +data_file 'AUDIO_GAMEDATA' 'audioconfig/tamustanggt50_game.dat' +data_file 'AUDIO_SOUNDDATA' 'audioconfig/tamustanggt50_sounds.dat' +data_file 'AUDIO_WAVEPACK' 'sfx/dlc_tamustanggt50' +data_file 'AUDIO_GAMEDATA' 'audioconfig/tascmustanggt50_game.dat' +data_file 'AUDIO_SOUNDDATA' 'audioconfig/tascmustanggt50_sounds.dat' +data_file 'AUDIO_WAVEPACK' 'sfx/dlc_tascmustanggt50' \ No newline at end of file diff --git a/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50.awc b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50.awc new file mode 100644 index 000000000..4621333e1 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50.awc differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50_npc.awc b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50_npc.awc new file mode 100644 index 000000000..ae3229fde Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tamustanggt50/tamustanggt50_npc.awc differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50.awc b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50.awc new file mode 100644 index 000000000..1222b7d04 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50.awc differ diff --git a/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50_npc.awc b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50_npc.awc new file mode 100644 index 000000000..167722ee2 Binary files /dev/null and b/server-data/resources/[sound_cars]/tamustanggt50/sfx/dlc_tascmustanggt50/tascmustanggt50_npc.awc differ diff --git a/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carcols.meta b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carcols.meta new file mode 100644 index 000000000..9e147f144 --- /dev/null +++ b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carcols.meta @@ -0,0 +1,1019 @@ + + + + + 963_mgt_modkit + + MKT_SPECIAL + + + mgt_spoil_1 + MGT_SPOIL_l + + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_2 + MGT_SPOIL_2 + + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_3 + MGT_SPOIL_3 + + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_4 + MGT_SPOIL_4 + + + misc_b + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_6 + MGT_SPOIL_6 + + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_5 + MGT_SPOIL_5 + + + misc_b + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_spoil_7 + MGT_SPOIL_7 + + + misc_b + + VMT_SPOILER + boot + boot + VMCP_DEFAULT + + + + + + + + mgt_split_1 + MGT_SPLIT_1 + + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_split_2 + MGT_SPLIT_2 + + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_split_3 + MGT_SPLIT_3 + + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_split_4 + MGT_SPLIT_4 + + + bumper_f + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_split_5 + MGT_SPLIT_5 + + + bumper_f + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_split_6 + MGT_SPLIT_6 + + + bumper_f + + VMT_BUMPER_F + bumper_f + bumper_f + VMCP_DEFAULT + + + + + + + + mgt_roof + MGT_ROOF + + + misc_c + + VMT_ROOF + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_bon_1 + MGT_BON_1 + + + bonnet + + VMT_BONNET + bonnet + bonnet + VMCP_DEFAULT + + + + + + + + mgt_bon_2 + MGT_BON_2 + + + bonnet + + VMT_BONNET + bonnet + bonnet + VMCP_DEFAULT + + + + + + + + mgt_bon_3 + MGT_BON_3 + + + bonnet + + VMT_BONNET + bonnet + bonnet + VMCP_DEFAULT + + + + + + + + mgt_bon_4 + MGT_BON_4 + + + bonnet + + VMT_BONNET + bonnet + bonnet + VMCP_DEFAULT + + + + + + + + mgt_bon_5 + MGT_BON_5 + + + bonnet + + VMT_BONNET + bonnet + bonnet + VMCP_DEFAULT + + + + + + + + mgt_bumr_1 + MGT_BUMR + + + VMT_BUMPER_R + misc_d + chassis + VMCP_DEFAULT + + + + + + + + mgt_bumr_2 + MGT_BUMR_2 + + + bumper_r + misc_g + + VMT_BUMPER_R + misc_d + chassis + VMCP_DEFAULT + + + + + + + + mgt_bumr_3 + MGT_BUMR_3 + + + misc_g + + VMT_BUMPER_R + misc_d + chassis + VMCP_DEFAULT + + + + + + + + mgt_skirt_1 + MGT_SKIRT + + + VMT_SKIRT + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_skirt_2 + MGT_SKIRT_2 + + + misc_e + + VMT_SKIRT + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_skirt_3 + MGT_SKIRT_3 + + + misc_e + + VMT_SKIRT + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_skirt_4 + MGT_SKIRT_4 + + + misc_e + + VMT_SKIRT + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_cage + MGT_CAGE + + + VMT_CHASSIS + chassis + chassis + VMCP_DEFAULT + + + + + + + + mgt_wing + MGT_WING + + + VMT_WING_R + chassis + chassis + VMCP_DEFAULT + + + + + + + + + + + + + + + VMT_ENGINE + + + + + + + VMT_ENGINE + + + + + + + VMT_ENGINE + + + + + + + VMT_ENGINE + + + + + + + VMT_BRAKES + + + + + + + VMT_BRAKES + + + + + + + VMT_BRAKES + + + + + + + VMT_GEARBOX + + + + + + + VMT_GEARBOX + + + + + + + VMT_GEARBOX + + + + + + + VMT_ARMOUR + + + + + + + VMT_ARMOUR + + + + + + + VMT_ARMOUR + + + + + + + VMT_ARMOUR + + + + + + + VMT_ARMOUR + + + HORN_TRUCK + + + + VMT_HORN + + + HORN_COP + + + + VMT_HORN + + + HORN_CLOWN + + + + VMT_HORN + + + HORN_MUSICAL_1 + + + + VMT_HORN + + + HORN_MUSICAL_2 + + + + VMT_HORN + + + HORN_MUSICAL_3 + + + + VMT_HORN + + + HORN_MUSICAL_4 + + + + VMT_HORN + + + HORN_MUSICAL_5 + + + + VMT_HORN + + + HORN_SAD_TROMBONE + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_1 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_2 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_3 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_4 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_5 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_6 + + + + VMT_HORN + + + MUSICAL_HORN_BUSINESS_7 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_C0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_D0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_E0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_F0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_G0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_A0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_B0 + + + + VMT_HORN + + + DLC_BUSI2_C_MAJOR_NOTES_C1 + + + + VMT_HORN + + + HIPSTER_HORN_1 + + + + VMT_HORN + + + HIPSTER_HORN_2 + + + + VMT_HORN + + + HIPSTER_HORN_3 + + + + VMT_HORN + + + HIPSTER_HORN_4 + + + + VMT_HORN + + + INDEP_HORN_1 + + + + VMT_HORN + + + INDEP_HORN_2 + + + + VMT_HORN + + + INDEP_HORN_3 + + + + VMT_HORN + + + INDEP_HORN_4 + + + + VMT_HORN + + + LUXE_HORN_1 + + + + VMT_HORN + + + LUXE_HORN_2 + + + + VMT_HORN + + + LUXE_HORN_3 + + + + VMT_HORN + + + + LUXORY_HORN_1 + + + + VMT_HORN + + + + LUXURY_HORN_2 + + + + VMT_HORN + + + + LUXURY_HORN_3 + + + + VMT_HORN + + + + + + + VMT_SUSPENSION + + + + + + + VMT_SUSPENSION + + + + + + + VMT_SUSPENSION + + + + + + + VMT_SUSPENSION + + + + + VMT_CHASSIS + TOP_CAGE + + + MGT_LV1 + MGT_LV2 + MGT_LV3 + MGT_LV4 + MGT_LV5 + MGT_LV6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VehicleLight_car_oldsquare + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mgt + + + \ No newline at end of file diff --git a/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carvariations.meta b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carvariations.meta new file mode 100644 index 000000000..2aa968360 --- /dev/null +++ b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/carvariations.meta @@ -0,0 +1,163 @@ + + + + + + mgt + + + + 64 + 0 + 140 + 1 + + + + + + + + + + + + + + + 29 + 0 + 29 + 1 + + + + + + + + + + + + + + + 38 + 0 + 88 + 1 + + + + + + + + + + + + + + + 138 + 0 + 138 + 1 + + + + + + + + + + + + + + + 70 + 0 + 140 + 1 + + + + + + + + + + + + + + + 112 + 0 + 0 + 1 + + + + + + + + + + + + + + + 1 + 0 + 5 + 1 + + + + + + + + + + + + + + + 963_mgt_modkit + + + + + + Standard White + + + + White Plate 2 + + + + Blue Plate + + + + Yellow Plate + + + + + + + + + \ No newline at end of file diff --git a/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/dlctext.meta b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/dlctext.meta new file mode 100644 index 000000000..22bb4c390 --- /dev/null +++ b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/dlctext.meta @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/handling.meta b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/handling.meta new file mode 100644 index 000000000..259c4af00 --- /dev/null +++ b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/handling.meta @@ -0,0 +1,67 @@ + + + + + + MGT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 440010 + 0 + 0 + AVERAGE + + + + + + + + + + + + diff --git a/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/vehicles.meta b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/vehicles.meta new file mode 100644 index 000000000..68b632309 --- /dev/null +++ b/server-data/resources/bpt_cars/data/Ford-Mustang-mgt/vehicles.meta @@ -0,0 +1,124 @@ + + + vehshare + + + + MGT + MGT + MGT + MUSTANG + FORD + null + null + null + null + + null + tamustanggt50 + LAYOUT_LOW_INFERNUS + ZENTORNO_COVER_OFFSET_INFO + EXPLOSION_INFO_DEFAULT + + FOLLOW_CHEETAH_CAMERA + DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_MID_HIGH + DEFAULT_POV_CAMERA_NO_REVERSE + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_CAR_GENERIC + + + + + + + + + + + + + + + + + + + + + + 30.000000 + 60.000000 + 100.000000 + 150.000000 + 250.000000 + 500.000000 + + + + + + + + + + + SWANKNESS_5 + + FLAG_SPORTS FLAG_RICH_CAR FLAG_NO_BROKEN_DOWN_SCENARIO FLAG_COUNT_AS_FACEBOOK_DRIVEN FLAG_HAS_INTERIOR_EXTRAS + VEHICLE_TYPE_CAR + VPT_FRONT_AND_BACK_PLATES + VDT_ZTYPE + VC_SUPER + VWT_HIEND + + + + + + + + + + + + WHEEL_FRONT_RIGHT_CAMERA + WHEEL_FRONT_LEFT_CAMERA + WHEEL_REAR_RIGHT_CAMERA + WHEEL_REAR_LEFT_CAMERA + + + + + + + LOW_HOTKNIFE_FRONT_LEFT + LOW_HOTKNIFE_FRONT_RIGHT + + + + + + + vehicles_btype_interior + MGT + + + + \ No newline at end of file diff --git a/server-data/resources/bpt_cars/fxmanifest.lua b/server-data/resources/bpt_cars/fxmanifest.lua index f250041e6..543c97d89 100644 --- a/server-data/resources/bpt_cars/fxmanifest.lua +++ b/server-data/resources/bpt_cars/fxmanifest.lua @@ -40,6 +40,13 @@ files({ "data/Mercedes-BenzSLS/vehicles.meta", "data/Mercedes-BenzSLS/carcols.meta", "data/Mercedes-BenzSLS/carvariations.meta", + + -- Ford-Mustang-mgt + "data/Ford-Mustang-mgt/handling.meta", + "data/Ford-Mustang-mgt/vehicles.meta", + "data/Ford-Mustang-mgt/carcols.meta", + "data/Ford-Mustang-mgt/carvariations.meta", + "data/Ford-Mustang-mgt/dlctext.meta", }) -- bmw440 @@ -77,6 +84,13 @@ data_file("VEHICLE_METADATA_FILE")("data/Mercedes-BenzSLS/vehicles.meta") data_file("CARCOLS_FILE")("data/Mercedes-BenzSLS/carcols.meta") data_file("VEHICLE_VARIATION_FILE")("data/Mercedes-BenzSLS/carvariations.meta") +-- Ford-Mustang-mgt +data_file("HANDLING_FILE")("data/Ford-Mustang-mgt/handling.meta") +data_file("VEHICLE_METADATA_FILE")("data/Ford-Mustang-mgt/vehicles.meta") +data_file("CARCOLS_FILE")("data/Ford-Mustang-mgt/carcols.meta") +data_file("VEHICLE_VARIATION_FILE")("data/Ford-Mustang-mgt/carvariations.meta") +data_file("DLCTEXT_FILE")("data/Ford-Mustang-mgt/dlctext.meta") + client_script({ "vehicle_names.lua", }) diff --git a/server-data/resources/bpt_cars/stream/mgt.yft b/server-data/resources/bpt_cars/stream/mgt.yft new file mode 100644 index 000000000..4c2596a1e Binary files /dev/null and b/server-data/resources/bpt_cars/stream/mgt.yft differ diff --git a/server-data/resources/bpt_cars/stream/mgt.ytd b/server-data/resources/bpt_cars/stream/mgt.ytd new file mode 100644 index 000000000..918d06b9d Binary files /dev/null and b/server-data/resources/bpt_cars/stream/mgt.ytd differ diff --git a/server-data/resources/bpt_cars/stream/mgt_hi.yft b/server-data/resources/bpt_cars/stream/mgt_hi.yft new file mode 100644 index 000000000..36e1b0017 Binary files /dev/null and b/server-data/resources/bpt_cars/stream/mgt_hi.yft differ diff --git a/server-data/resources/bpt_cars/vehicle_names.lua b/server-data/resources/bpt_cars/vehicle_names.lua index 2ce9a5e38..18976aa96 100644 --- a/server-data/resources/bpt_cars/vehicle_names.lua +++ b/server-data/resources/bpt_cars/vehicle_names.lua @@ -5,4 +5,5 @@ CreateThread(function() AddTextEntry("mads14", "Nissan S14 Drift") AddTextEntry("tmax", "Tmax500") AddTextEntry("slsamg", "Mercedes-BenzSLS") + AddTextEntry("mgt", "Ford Mustang") end)