Discord - -Copyright (C) 2022-2024 bitpredator - -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. - -ATTENTION: -You are not authorized to change the name of the resource and the resources within it. -If you want to contribute you can open a pull request. -You are not authorized to sell this software (this is free project). -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 http://www.gnu.org/licenses/. diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/bpt_dustmanjob.sql b/server-data/resources/[bpt_addons]/bpt_dustman/bpt_dustmanjob.sql deleted file mode 100644 index 4460188fe..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/bpt_dustmanjob.sql +++ /dev/null @@ -1,23 +0,0 @@ -INSERT INTO `addon_account` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `datastore` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `addon_inventory` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `jobs` (name, label) VALUES - ('dustman', 'Dustman') -; - -INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES - ('dustman',0,'ontrial','Ontrial',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',1,'employee','Employee',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',2,'driver','Driver',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',3,'responsible','Responsible',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',4,'boss','Boss',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') -; diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/client/main.lua b/server-data/resources/[bpt_addons]/bpt_dustman/client/main.lua deleted file mode 100644 index e64feb87b..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/client/main.lua +++ /dev/null @@ -1,378 +0,0 @@ -local HasAlreadyEnteredMarker -local CurrentAction, CurrentActionMsg, CurrentActionData = nil, "", {} -local LastZone - -RegisterNetEvent("esx:playerLoaded") -AddEventHandler("esx:playerLoaded", function(xPlayer) - ESX.PlayerData = xPlayer - ESX.PlayerLoaded = true -end) - -RegisterNetEvent("esx:onPlayerLogout") -AddEventHandler("esx:onPlayerLogout", function() - ESX.PlayerLoaded = false - ESX.PlayerData = {} -end) - -RegisterNetEvent("esx:setJob") -AddEventHandler("esx:setJob", function(job) - ESX.PlayerData.job = job -end) - -function DrawSub(msg, time) - ClearPrints() - BeginTextCommandPrint("STRING") - AddTextComponentSubstringPlayerName(msg) - EndTextCommandPrint(time, 1) -end - -function ShowLoadingPromt(msg, time, type) - CreateThread(function() - Wait(0) - - BeginTextCommandBusyspinnerOn("STRING") - AddTextComponentSubstringPlayerName(msg) - EndTextCommandBusyspinnerOn(type) - Wait(time) - - BusyspinnerOff() - end) -end - -function OpenCloakroom() - local elements = { - { unselectable = true, icon = "fas fa-shirt", title = TranslateCap("cloakroom_menu") }, - { icon = "fas fa-shirt", title = TranslateCap("wear_citizen"), value = "wear_citizen" }, - { icon = "fas fa-shirt", title = TranslateCap("wear_work"), value = "wear_work" }, - } - - ESX.OpenContext("right", elements, function(_, element) - if element.value == "wear_citizen" then - ESX.TriggerServerCallback("esx_skin:getPlayerSkin", function(skin) - TriggerEvent("skinchanger:loadSkin", skin) - end) - elseif element.value == "wear_work" then - ESX.TriggerServerCallback("esx_skin:getPlayerSkin", function(skin, jobSkin) - if skin.sex == 0 then - TriggerEvent("skinchanger:loadClothes", skin, jobSkin.skin_male) - else - TriggerEvent("skinchanger:loadClothes", skin, jobSkin.skin_female) - end - end) - end - ESX.CloseContext() - end, function() - CurrentAction = "cloakroom" - CurrentActionMsg = TranslateCap("cloakroom_prompt") - CurrentActionData = {} - end) -end - -function OpenVehicleSpawnerMenu() - local elements = { - { unselectable = true, icon = "fas fa-car", title = TranslateCap("spawn_veh") }, - } - - if Config.EnableSocietyOwnedVehicles then - ESX.TriggerServerCallback("esx_society:getVehiclesInGarage", function(vehicles) - if #vehicles == 0 then - ESX.ShowNotification(TranslateCap("empty_garage")) - return - end - - for i = 1, #vehicles, 1 do - elements[#elements + 1] = { - icon = "fas fa-car", - title = GetDisplayNameFromVehicleModel(vehicles[i].model) .. " [" .. vehicles[i].plate .. "]", - value = vehicles[i], - } - end - - ESX.OpenContext("right", elements, function(_, element) - if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then - ESX.ShowNotification(TranslateCap("spawnpoint_blocked")) - return - end - - if element.value == nil then - print("ERROR: Context menu clicked item value is nil!") - return - end - - local vehicleProps = element.value - ESX.TriggerServerCallback("bpt_dustmanjob:SpawnVehicle", function() - return - end, vehicleProps.model, vehicleProps) - TriggerServerEvent("esx_society:removeVehicleFromGarage", "dustman", vehicleProps) - end, function() - CurrentAction = "vehicle_spawner" - CurrentActionMsg = TranslateCap("spawner_prompt") - CurrentActionData = {} - end) - end, "dustman") - else -- not society vehicles - if #Config.AuthorizedVehicles == 0 then - ESX.ShowNotification(TranslateCap("empty_garage")) - return - end - - for i = 1, #Config.AuthorizedVehicles, 1 do - elements[#elements + 1] = { - icon = "fas fa-car", - title = Config.AuthorizedVehicles[i].label, - value = Config.AuthorizedVehicles[i].model, - } - end - - ESX.OpenContext("right", elements, function(_, element) - if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then - ESX.ShowNotification(TranslateCap("spawnpoint_blocked")) - return - end - - if element.value == nil then - print("ERROR: Context menu clicked item value is nil!") - return - end - - ESX.TriggerServerCallback("bpt_dustmanjob:SpawnVehicle", function() - ESX.ShowNotification(TranslateCap("vehicle_spawned"), "success") - end, element.value, { plate = "DUSTMAN" }) - ESX.CloseContext() - end, function() - CurrentAction = "vehicle_spawner" - CurrentActionMsg = TranslateCap("spawner_prompt") - CurrentActionData = {} - end) - end -end - -function DeleteJobVehicle() - if Config.EnableSocietyOwnedVehicles then - local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) - TriggerServerEvent("esx_society:putVehicleInGarage", "dustman", vehicleProps) - ESX.Game.DeleteVehicle(CurrentActionData.vehicle) - else - if IsInAuthorizedVehicle() then - ESX.Game.DeleteVehicle(CurrentActionData.vehicle) - - if Config.MaxInService ~= -1 then - TriggerServerEvent("esx_service:disableService", "dustman") - end - else - ESX.ShowNotification(TranslateCap("only_dustman")) - end - end -end - -function OpenDustmanActionsMenu() - local elements = { - { unselectable = true, icon = "fas fa-dustman", title = TranslateCap("dustman") }, - { icon = "fas fa-box", title = TranslateCap("deposit_stock"), value = "put_stock" }, - { icon = "fas fa-box", title = TranslateCap("take_stock"), value = "get_stock" }, - } - - if Config.EnablePlayerManagement and ESX.PlayerData.job ~= nil and ESX.PlayerData.job.grade_name == "boss" then - elements[#elements + 1] = { - icon = "fas fa-wallet", - title = TranslateCap("boss_actions"), - value = "boss_actions", - } - end - - ESX.OpenContext("right", elements, function(_, element) - if Config.OxInventory and (element.value == "put_stock" or element.value == "get_stock") then - exports.ox_inventory:openInventory("stash", "society_dustman") - return ESX.CloseContext() - elseif element.value == "put_stock" then - OpenPutStocksMenu() - elseif element.value == "get_stock" then - OpenGetStocksMenu() - elseif element.value == "boss_actions" then - TriggerEvent("esx_society:openBossMenu", "dustman", function(_, menu) - menu.close() - end) - end - end, function() - CurrentAction = "dustman_actions_menu" - CurrentActionMsg = TranslateCap("press_to_open") - CurrentActionData = {} - end) -end - -function OpenMobileDustmanActionsMenu() - local elements = { - { unselectable = true, icon = "fas fa-dustman", title = TranslateCap("dustman") }, - { icon = "fas fa-scroll", title = TranslateCap("billing"), value = "billing" }, - } - - ESX.OpenContext("right", elements, function(_, element) - if element.value == "billing" then - local elements2 = { - { unselectable = true, icon = "fas fa-dustman", title = element.title }, - { - title = TranslateCap("amount"), - input = true, - inputType = "number", - inputMin = 1, - inputMax = 250000, - inputPlaceholder = TranslateCap("bill_amount"), - }, - { icon = "fas fa-check-double", title = TranslateCap("confirm"), value = "confirm" }, - } - - ESX.OpenContext("right", elements2, function(menu2) - local amount = tonumber(menu2.eles[2].inputValue) - if amount == nil then - ESX.ShowNotification(TranslateCap("amount_invalid")) - else - ESX.CloseContext() - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - ESX.ShowNotification(TranslateCap("no_players_near")) - else - TriggerServerEvent("bpt_billing:sendBill", GetPlayerServerId(closestPlayer), "society_dustman", "Dustman", amount) - ESX.ShowNotification(TranslateCap("billing_sent")) - end - end - end) - end - end) -end - -function IsInAuthorizedVehicle() - local playerPed = PlayerPedId() - local vehModel = GetEntityModel(GetVehiclePedIsIn(playerPed, false)) - - for i = 1, #Config.AuthorizedVehicles, 1 do - if vehModel == joaat(Config.AuthorizedVehicles[i].model) then - return true - end - end - - return false -end - -AddEventHandler("bpt_dustmanjob:hasEnteredMarker", function(zone) - if zone == "VehicleSpawner" then - CurrentAction = "vehicle_spawner" - CurrentActionMsg = TranslateCap("spawner_prompt") - CurrentActionData = {} - elseif zone == "VehicleDeleter" then - local playerPed = PlayerPedId() - local vehicle = GetVehiclePedIsIn(playerPed, false) - - if IsPedInAnyVehicle(playerPed, false) and GetPedInVehicleSeat(vehicle, -1) == playerPed then - CurrentAction = "delete_vehicle" - CurrentActionMsg = TranslateCap("store_veh") - CurrentActionData = { - vehicle = vehicle, - } - end - elseif zone == "DustmanActions" then - CurrentAction = "dustman_actions_menu" - CurrentActionMsg = TranslateCap("press_to_open") - CurrentActionData = {} - elseif zone == "Cloakroom" then - CurrentAction = "cloakroom" - CurrentActionMsg = TranslateCap("cloakroom_prompt") - CurrentActionData = {} - end -end) - -AddEventHandler("bpt_dustmanjob:hasExitedMarker", function() - ESX.CloseContext() - CurrentAction = nil -end) - --- Create Blips -CreateThread(function() - local blip = AddBlipForCoord(Config.Zones.DustmanActions.Pos.x, Config.Zones.DustmanActions.Pos.y, Config.Zones.DustmanActions.Pos.z) - - SetBlipSprite(blip, 67) - SetBlipDisplay(blip, 4) - SetBlipScale(blip, 1.0) - SetBlipColour(blip, 21) - SetBlipAsShortRange(blip, true) - - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(TranslateCap("blip_dustman")) - EndTextCommandSetBlipName(blip) -end) - --- Enter / Exit marker events, and draw markers -CreateThread(function() - while true do - local sleep = 1500 - if ESX.PlayerData.job and ESX.PlayerData.job.name == "dustman" then - local coords = GetEntityCoords(PlayerPedId()) - local isInMarker, currentZone = false - local inVeh = IsPedInAnyVehicle(PlayerPedId()) - - for k, v in pairs(Config.Zones) do - local zonePos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) - local distance = #(coords - zonePos) - - if v.Type ~= -1 and distance < Config.DrawDistance then - sleep = 0 - if k == "VehicleDeleter" then - if inVeh then - DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, false, 2, v.Rotate, nil, nil, false) - end - else - DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, false, 2, v.Rotate, nil, nil, false) - end - end - - if distance < v.Size.x then - isInMarker, currentZone = true, k - end - end - - if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then - HasAlreadyEnteredMarker, LastZone = true, currentZone - TriggerEvent("bpt_dustmanjob:hasEnteredMarker", currentZone) - end - - if not isInMarker and HasAlreadyEnteredMarker then - HasAlreadyEnteredMarker = false - TriggerEvent("bpt_dustmanjob:hasExitedMarker", LastZone) - end - end - Wait(sleep) - end -end) - --- Key Controls -CreateThread(function() - while true do - local sleep = 1500 - if CurrentAction and not ESX.PlayerData.dead then - sleep = 0 - ESX.ShowHelpNotification(CurrentActionMsg) - - if IsControlJustReleased(0, 38) and ESX.PlayerData.job and ESX.PlayerData.job.name == "dustman" then - if CurrentAction == "dustman_actions_menu" then - OpenDustmanActionsMenu() - elseif CurrentAction == "cloakroom" then - OpenCloakroom() - elseif CurrentAction == "vehicle_spawner" then - OpenVehicleSpawnerMenu() - elseif CurrentAction == "delete_vehicle" then - DeleteJobVehicle() - end - - CurrentAction = nil - end - end - Wait(sleep) - end -end) - -RegisterCommand("dustmanmenu", function() - if not ESX.PlayerData.dead and Config.EnablePlayerManagement and ESX.PlayerData.job and ESX.PlayerData.job.name == "dustman" then - OpenMobileDustmanActionsMenu() - end -end, false) - -RegisterKeyMapping("dustmanmenu", "Open Dustman Menu", "keyboard", "f6") diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/config.lua b/server-data/resources/[bpt_addons]/bpt_dustman/config.lua deleted file mode 100644 index effe95ea8..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/config.lua +++ /dev/null @@ -1,53 +0,0 @@ -Config = {} -Config.DrawDistance = 10.0 -- How close do you need to be for the markers to be drawn (in GTA units). -Config.EnablePlayerManagement = true -- Enable society managing. -Config.EnableSocietyOwnedVehicles = false -Config.Locale = "it" -Config.OxInventory = ESX.GetConfig().OxInventory - -Config.AuthorizedVehicles = { - { model = "biff", label = "Camion" }, -} - -Config.Zones = { - - VehicleSpawner = { - Pos = { x = -440.531860, y = -1696.087891, z = 18.934082 }, - Size = { x = 0.6, y = 0.6, z = 0.6 }, - Color = { r = 204, g = 204, b = 0 }, - Type = 36, - Rotate = true, - }, - - VehicleSpawnPoint = { - Pos = { x = -434.004395, y = -1707.006592, z = 18.967773 }, - Size = { x = 1.5, y = 1.5, z = 1.0 }, - Type = -1, - Rotate = false, - Heading = 225.0, - }, - - VehicleDeleter = { - Pos = { x = -434.004395, y = -1707.006592, z = 17.967773 }, - Size = { x = 3.0, y = 3.0, z = 0.25 }, - Color = { r = 255, g = 0, b = 0 }, - Type = 1, - Rotate = false, - }, - - DustmanActions = { - Pos = { x = -420.342865, y = -1675.054932, z = 19.018311 }, - Size = { x = 0.6, y = 0.6, z = 0.6 }, - Color = { r = 204, g = 204, b = 0 }, - Type = 20, - Rotate = true, - }, - - Cloakroom = { - Pos = { x = -430.760437, y = -1672.958252, z = 19.018311 }, - Size = { x = 0.6, y = 0.6, z = 0.6 }, - Color = { r = 204, g = 204, b = 0 }, - Type = 21, - Rotate = true, - }, -} diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/fxmanifest.lua b/server-data/resources/[bpt_addons]/bpt_dustman/fxmanifest.lua deleted file mode 100644 index d886eb617..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/fxmanifest.lua +++ /dev/null @@ -1,25 +0,0 @@ -fx_version("adamant") - -game("gta5") - -description("bpt_dustmanjob") -lua54("yes") -version("1.0.1") - -shared_script("@es_extended/imports.lua") - -client_scripts({ - "@es_extended/locale.lua", - "locales/*.lua", - "config.lua", - "client/*.lua", -}) - -server_scripts({ - "@es_extended/locale.lua", - "locales/*.lua", - "config.lua", - "server/*.lua", -}) - -dependency("es_extended") diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/locales/en.lua b/server-data/resources/[bpt_addons]/bpt_dustman/locales/en.lua deleted file mode 100644 index a31de029e..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/locales/en.lua +++ /dev/null @@ -1,34 +0,0 @@ -Locales["en"] = { - -- cloakroom - ["cloakroom_menu"] = "wardrobe", - ["cloakroom_prompt"] = "press [E] to access the cloakroom.", - ["wear_citizen"] = "civilian clothes", - ["wear_work"] = "work clothes", - -- garage - ["spawner_prompt"] = "press [E] to access the Garage.", - ["vehicle_spawned"] = "Vehicle picked up successfully!", - ["store_veh"] = "press [E] to deposit the vehicle", - ["spawn_veh"] = "spawn vehicle", - ["spawnpoint_blocked"] = "the spawnpoint is blocked !", - ["only_dustman"] = "you can only deposit company vehicles.", - ["taking_service"] = "take service: dustman", - ["full_service"] = "complete service: ", - ["amount_invalid"] = "invalid amount", - ["press_to_open"] = "press [E] to access the menu", - ["billing"] = "billing", - ["billing_sent"] = "the account has been registered!", - ["invoice_amount"] = "invoice amount", - ["no_players_near"] = "no players nearby", - ["boss_actions"] = "boss action", - ["blip_dustman"] = "dump", - ["dustman"] = "dustman", - -- Inventory - ["deposit_stock"] = "Deposit stock", - ["take_stock"] = "Take stock", - ["have_deposited"] = "Have deposited", - ["quantity_invalid"] = "Quantity invelid", - -- billing - ["bill_amount"] = "bill amount", - ["amount"] = "amount", - ["confirm"] = "Confirm", -} diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/locales/it.lua b/server-data/resources/[bpt_addons]/bpt_dustman/locales/it.lua deleted file mode 100644 index b1a0aac0f..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/locales/it.lua +++ /dev/null @@ -1,33 +0,0 @@ -Locales["it"] = { - -- cloakroom - ["cloakroom_menu"] = "guardaroba", - ["cloakroom_prompt"] = "premi [E] per accedere al guardaroba.", - ["wear_citizen"] = "abiti civili", - ["wear_work"] = "abiti da lavoro", - -- garage - ["spawner_prompt"] = "premi [E] per accedere al Garage.", - ["vehicle_spawned"] = "Veicolo ritirato con successo!", - ["store_veh"] = "premi [E] per depositare il veicolo", - ["spawn_veh"] = "spawn veicolo", - ["spawnpoint_blocked"] = "lo spawnpoint è bloccato !", - ["only_dustman"] = "puoi solo depositare veicoli aziendali.", - ["taking_service"] = "prendi servizio: dustman", - ["full_service"] = "servizio completo: ", - ["amount_invalid"] = "importo non valido", - ["press_to_open"] = "premi [E] per accedere al menu", - ["billing"] = "fattura", - ["billing_sent"] = "il conto è stato registrato!", - ["invoice_amount"] = "importo della fattura", - ["no_players_near"] = "nessun giocatore nelle vicinanze", - ["boss_actions"] = "Azioni del boss", - ["blip_dustman"] = "discarica", - ["dustman"] = "dustman", - -- Inventory - ["deposit_stock"] = "Depositare", - ["take_stock"] = "Prendi", - ["have_deposited"] = "Hai depositato", - ["quantity_invalid"] = "Qunatità non valida", - -- billing - ["bill_amount"] = "importo della fattura", - ["confirm"] = "Conferma", -} diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/localization/bpt_dustmanjob_it.sql b/server-data/resources/[bpt_addons]/bpt_dustman/localization/bpt_dustmanjob_it.sql deleted file mode 100644 index 31c24b433..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/localization/bpt_dustmanjob_it.sql +++ /dev/null @@ -1,23 +0,0 @@ -INSERT INTO `addon_account` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `datastore` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `addon_inventory` (name, label, shared) VALUES - ('society_dustman', 'Dustman', 1) -; - -INSERT INTO `jobs` (name, label) VALUES - ('dustman', 'Dustman') -; - -INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES - ('dustman',0,'ontrial','in prova',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',1,'employee','dipendente',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',2,'driver','autista',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',3,'responsible','responsabile',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), - ('dustman',4,'boss','Direttore',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') -; diff --git a/server-data/resources/[bpt_addons]/bpt_dustman/server/main.lua b/server-data/resources/[bpt_addons]/bpt_dustman/server/main.lua deleted file mode 100644 index b55c0a783..000000000 --- a/server-data/resources/[bpt_addons]/bpt_dustman/server/main.lua +++ /dev/null @@ -1,86 +0,0 @@ -TriggerEvent("esx_society:registerSociety", "dustman", "Dustman", "society_dustman", "society_dustman", "society_dustman", - { - type = "public", - } -) - -if Config.MaxInService ~= -1 then - TriggerEvent("esx_service:activateService", "dustman", Config.MaxInService) -end - -ESX.RegisterServerCallback("bpt_dustmanjob:SpawnVehicle", function(source, cb, model, props) - local xPlayer = ESX.GetPlayerFromId(source) - - if xPlayer.job.name ~= "dustman" then - print(("[^3WARNING^7] Player ^5%s^7 attempted to Exploit Vehicle Spawing!!"):format(source)) - return - end - local SpawnPoint = vector3( - Config.Zones.VehicleSpawnPoint.Pos.x, - Config.Zones.VehicleSpawnPoint.Pos.y, - Config.Zones.VehicleSpawnPoint.Pos.z - ) - ESX.OneSync.SpawnVehicle(joaat(model), SpawnPoint, Config.Zones.VehicleSpawnPoint.Heading, props, function() - local vehicle = NetworkGetEntityFromNetworkId() - while GetVehicleNumberPlateText(vehicle) ~= props.plate do - Wait(0) - end - TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) - end) - cb() -end) - -RegisterNetEvent("bpt_dustmanjob:getStockItem") -AddEventHandler("bpt_dustmanjob:getStockItem", function(itemName, count) - local xPlayer = ESX.GetPlayerFromId(source) - - if xPlayer.job.name == "dustman" then - TriggerEvent("bpt_addoninventory:getSharedInventory", "society_dustman", function(inventory) - local item = inventory.getItem(itemName) - - -- is there enough in the society? - if count > 0 and item.count >= count then - -- can the player carry the said amount of x item? - if xPlayer.canCarryItem(itemName, count) then - inventory.removeItem(itemName, count) - xPlayer.addInventoryItem(itemName, count) - xPlayer.showNotification(TranslateCap("have_withdrawn", count, item.label)) - else - xPlayer.showNotification(TranslateCap("player_cannot_hold")) - end - else - xPlayer.showNotification(TranslateCap("quantity_invalid")) - end - end) - else - print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_dustmanjob:getStockItem^7 (cheating)"):format(source)) - end -end) - -ESX.RegisterServerCallback("bpt_dustmanjob:getStockItems", function(_, cb) - TriggerEvent("bpt_addoninventory:getSharedInventory", "society_dustman", function(inventory) - cb(inventory.items) - end) -end) - -RegisterNetEvent("bpt_dustmanjob:putStockItems") -AddEventHandler("bpt_dustmanjob:putStockItems", function(itemName, count) - local xPlayer = ESX.GetPlayerFromId(source) - local sourceItem = xPlayer.getInventoryItem(itemName) - - if xPlayer.job.name == "dustman" then - TriggerEvent("bpt_addoninventory:getSharedInventory", "society_dustman", function(inventory) - local item = inventory.getItem(itemName) - - if sourceItem.count >= count and count > 0 then - xPlayer.removeInventoryItem(itemName, count) - inventory.addItem(itemName, count) - xPlayer.showNotification(TranslateCap("have_deposited", count, item.label)) - else - xPlayer.showNotification(TranslateCap("quantity_invalid")) - end - end) - else - print(("[^3WARNING^7] Player ^5%s^7 attempted ^5bpt_dustmanjob:putStockItems^7 (cheating)"):format(source)) - end -end)