From 5c4ca0168e2326d80fd8e2e877626d728d4c8297 Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Thu, 14 Sep 2017 16:54:37 +0200 Subject: [PATCH] chore(coding-style): correct indentation --- .editorconfig | 9 + __resource.lua | 28 +- client/main.lua | 1069 ++++++++++++++++++------------------ config.lua | 218 ++++---- locales/br.lua | 58 +- locales/de.lua | 58 +- locales/en.lua | 78 ++- locales/fr.lua | 78 ++- localization/de_config.lua | 218 ++++---- server/main.lua | 92 ++-- 10 files changed, 954 insertions(+), 952 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..41c2aaf2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 2 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/__resource.lua b/__resource.lua index 9a4b5b29..662fab57 100644 --- a/__resource.lua +++ b/__resource.lua @@ -3,21 +3,21 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'ESX Taxi Job' client_scripts { - '@es_extended/locale.lua', - 'locales/de.lua', - 'locales/br.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'config.lua', - 'client/main.lua' + '@es_extended/locale.lua', + 'locales/de.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'config.lua', + 'client/main.lua' } server_scripts { - '@es_extended/locale.lua', - 'locales/de.lua', - 'locales/br.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'config.lua', - 'server/main.lua' + '@es_extended/locale.lua', + 'locales/de.lua', + 'locales/br.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'config.lua', + 'server/main.lua' } diff --git a/client/main.lua b/client/main.lua index 33fd6dad..09877334 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,19 +1,17 @@ local Keys = { - ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, - ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, - ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, - ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, - ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, - ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, - ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, - ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, - ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 + ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, + ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, + ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, + ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, + ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, + ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, + ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, + ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, + ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 } -ESX = nil local PlayerData = {} local GUI = {} -GUI.Time = 0 local HasAlreadyEnteredMarker = false local LastZone = nil local CurrentAction = nil @@ -28,843 +26,846 @@ local CustomerIsEnteringVehicle = false local CustomerEnteredVehicle = false local TargetCoords = nil +ESX = nil +GUI.Time = 0 + Citizen.CreateThread(function() - while ESX == nil do - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - Citizen.Wait(0) - end + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(0) + end end) function DrawSub(msg, time) ClearPrints() - SetTextEntry_2("STRING") - AddTextComponentString(msg) - DrawSubtitleTimed(time, 1) + SetTextEntry_2("STRING") + AddTextComponentString(msg) + DrawSubtitleTimed(time, 1) end function ShowLoadingPromt(msg, time, type) - Citizen.CreateThread(function() - Citizen.Wait(0) - N_0xaba17d7ce615adbf("STRING") - AddTextComponentString(msg) - N_0xbd12f8228410d9b4(type) - Citizen.Wait(time) - N_0x10d373323e5b9c0d() - end) + Citizen.CreateThread(function() + Citizen.Wait(0) + N_0xaba17d7ce615adbf("STRING") + AddTextComponentString(msg) + N_0xbd12f8228410d9b4(type) + Citizen.Wait(time) + N_0x10d373323e5b9c0d() + end) end function GetRandomWalkingNPC() - local search = {} - local peds = ESX.Game.GetPeds() + local search = {} + local peds = ESX.Game.GetPeds() - for i=1, #peds, 1 do - if IsPedHuman(peds[i]) and IsPedWalking(peds[i]) and not IsPedAPlayer(peds[i]) then - table.insert(search, peds[i]) - end - end + for i=1, #peds, 1 do + if IsPedHuman(peds[i]) and IsPedWalking(peds[i]) and not IsPedAPlayer(peds[i]) then + table.insert(search, peds[i]) + end + end - if #search > 0 then - return search[GetRandomIntInRange(1, #search)] - end + if #search > 0 then + return search[GetRandomIntInRange(1, #search)] + end - print('Using fallback code to find walking ped') + print('Using fallback code to find walking ped') - while true do + while true do - local ped = GetRandomPedAtCoord(0.0, 0.0, 0.0, math.huge + 0.0, math.huge + 0.0, math.huge + 0.0, 26) + local ped = GetRandomPedAtCoord(0.0, 0.0, 0.0, math.huge + 0.0, math.huge + 0.0, math.huge + 0.0, 26) - if DoesEntityExist(ped) and IsPedHuman(ped) and IsPedWalking(ped) and not IsPedAPlayer(ped) then - return ped - end + if DoesEntityExist(ped) and IsPedHuman(ped) and IsPedWalking(ped) and not IsPedAPlayer(ped) then + return ped + end - end + end end function ClearCurrentMission() - if DoesBlipExist(CurrentCustomerBlip) then - RemoveBlip(CurrentCustomerBlip) - end + if DoesBlipExist(CurrentCustomerBlip) then + RemoveBlip(CurrentCustomerBlip) + end - if DoesBlipExist(DestinationBlip) then - RemoveBlip(DestinationBlip) - end + if DoesBlipExist(DestinationBlip) then + RemoveBlip(DestinationBlip) + end - CurrentCustomer = nil - CurrentCustomerBlip = nil - DestinationBlip = nil - IsNearCustomer = false - CustomerIsEnteringVehicle = false - CustomerEnteredVehicle = false - TargetCoords = nil + CurrentCustomer = nil + CurrentCustomerBlip = nil + DestinationBlip = nil + IsNearCustomer = false + CustomerIsEnteringVehicle = false + CustomerEnteredVehicle = false + TargetCoords = nil end function StartTaxiJob() - ShowLoadingPromt(_U('taking_service') .. 'Taxi/Uber', 5000, 3) - ClearCurrentMission() + ShowLoadingPromt(_U('taking_service') .. 'Taxi/Uber', 5000, 3) + ClearCurrentMission() - OnJob = true + OnJob = true end function StopTaxiJob() - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - if IsPedInAnyVehicle(playerPed, false) and CurrentCustomer ~= nil then - local vehicle = GetVehiclePedIsIn(playerPed, false) - TaskLeaveVehicle(CurrentCustomer, vehicle, 0) + if IsPedInAnyVehicle(playerPed, false) and CurrentCustomer ~= nil then + local vehicle = GetVehiclePedIsIn(playerPed, false) + TaskLeaveVehicle(CurrentCustomer, vehicle, 0) - if CustomerEnteredVehicle then - TaskGoStraightToCoord(CurrentCustomer, TargetCoords.x, TargetCoords.y, TargetCoords.z, 1.0, -1, 0.0, 0.0) - end + if CustomerEnteredVehicle then + TaskGoStraightToCoord(CurrentCustomer, TargetCoords.x, TargetCoords.y, TargetCoords.z, 1.0, -1, 0.0, 0.0) + end - end + end - ClearCurrentMission() + ClearCurrentMission() - OnJob = false + OnJob = false - DrawSub(_U('mission_complete'), 5000) + DrawSub(_U('mission_complete'), 5000) end function OpenTaxiActionsMenu() - local elements = { - {label = _U('spawn_veh'), value = 'spawn_vehicle'}, - {label = _U('deposit_stock'), value = 'put_stock'}, - {label = _U('take_stock'), value = 'get_stock'} - } + local elements = { + {label = _U('spawn_veh'), value = 'spawn_vehicle'}, + {label = _U('deposit_stock'), value = 'put_stock'}, + {label = _U('take_stock'), value = 'get_stock'} + } - if Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.grade_name == 'boss' then - table.insert(elements, {label = _U('boss_actions'), value = 'boss_actions'}) - end + if Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.grade_name == 'boss' then + table.insert(elements, {label = _U('boss_actions'), value = 'boss_actions'}) + end - ESX.UI.Menu.CloseAll() + ESX.UI.Menu.CloseAll() - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'taxi_actions', - { - title = 'Taxi', - elements = elements - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'taxi_actions', + { + title = 'Taxi', + elements = elements + }, + function(data, menu) - if data.current.value == 'put_stock' then - OpenPutStocksMenu() - end + if data.current.value == 'put_stock' then + OpenPutStocksMenu() + end - if data.current.value == 'get_stock' then - OpenGetStocksMenu() - end + if data.current.value == 'get_stock' then + OpenGetStocksMenu() + end - if data.current.value == 'spawn_vehicle' then + if data.current.value == 'spawn_vehicle' then - if Config.EnableSocietyOwnedVehicles then + if Config.EnableSocietyOwnedVehicles then - local elements = {} + local elements = {} - ESX.TriggerServerCallback('esx_society:getVehiclesInGarage', function(vehicles) + ESX.TriggerServerCallback('esx_society:getVehiclesInGarage', function(vehicles) - for i=1, #vehicles, 1 do - table.insert(elements, {label = GetDisplayNameFromVehicleModel(vehicles[i].model) .. ' [' .. vehicles[i].plate .. ']', value = vehicles[i]}) - end + for i=1, #vehicles, 1 do + table.insert(elements, {label = GetDisplayNameFromVehicleModel(vehicles[i].model) .. ' [' .. vehicles[i].plate .. ']', value = vehicles[i]}) + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'vehicle_spawner', - { - title = _U('spawn_veh'), - align = 'top-left', - elements = elements, - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'vehicle_spawner', + { + title = _U('spawn_veh'), + align = 'top-left', + elements = elements, + }, + function(data, menu) - menu.close() + menu.close() - local vehicleProps = data.current.value + local vehicleProps = data.current.value - ESX.Game.SpawnVehicle(vehicleProps.model, Config.Zones.VehicleSpawnPoint.Pos, 270.0, function(vehicle) - ESX.Game.SetVehicleProperties(vehicle, vehicleProps) - local playerPed = GetPlayerPed(-1) - TaskWarpPedIntoVehicle(playerPed, vehicle, -1) - end) + ESX.Game.SpawnVehicle(vehicleProps.model, Config.Zones.VehicleSpawnPoint.Pos, 270.0, function(vehicle) + ESX.Game.SetVehicleProperties(vehicle, vehicleProps) + local playerPed = GetPlayerPed(-1) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) - TriggerServerEvent('esx_society:removeVehicleFromGarage', 'taxi', vehicleProps) + TriggerServerEvent('esx_society:removeVehicleFromGarage', 'taxi', vehicleProps) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end, 'taxi') + end, 'taxi') - else + else - menu.close() + menu.close() - if Config.MaxInService == -1 then + if Config.MaxInService == -1 then - local playerPed = GetPlayerPed(-1) - local coords = Config.Zones.VehicleSpawnPoint.Pos + local playerPed = GetPlayerPed(-1) + local coords = Config.Zones.VehicleSpawnPoint.Pos - ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle) - TaskWarpPedIntoVehicle(playerPed, vehicle, -1) - end) + ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) - else + else - ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount) + ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount) - if canTakeService then + if canTakeService then - local playerPed = GetPlayerPed(-1) - local coords = Config.Zones.VehicleSpawnPoint.Pos + local playerPed = GetPlayerPed(-1) + local coords = Config.Zones.VehicleSpawnPoint.Pos - ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle) - TaskWarpPedIntoVehicle(playerPed, vehicle, -1) - end) + ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) - else + else - ESX.ShowNotification(_U('full_service') .. inServiceCount .. '/' .. maxInService) + ESX.ShowNotification(_U('full_service') .. inServiceCount .. '/' .. maxInService) - end + end - end, 'taxi') + end, 'taxi') - end + end - end + end - end + end - if data.current.value == 'boss_actions' then - TriggerEvent('esx_society:openBossMenu', 'taxi', function(data, menu) - menu.close() - end) - end + if data.current.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'taxi', function(data, menu) + menu.close() + end) + end - end, - function(data, menu) + end, + function(data, menu) - menu.close() + menu.close() - CurrentAction = 'taxi_actions_menu' - CurrentActionMsg = _U('press_to_open') - CurrentActionData = {} + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = _U('press_to_open') + CurrentActionData = {} - end - ) + end + ) end function OpenMobileTaxiActionsMenu() - ESX.UI.Menu.CloseAll() + ESX.UI.Menu.CloseAll() - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'mobile_taxi_actions', - { - title = 'Taxi', - elements = { - {label = _U('billing'), value = 'billing'} - } - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'mobile_taxi_actions', + { + title = 'Taxi', + elements = { + {label = _U('billing'), value = 'billing'} + } + }, + function(data, menu) - if data.current.value == 'billing' then + if data.current.value == 'billing' then - ESX.UI.Menu.Open( - 'dialog', GetCurrentResourceName(), 'billing', - { - title = _U('invoice_amount') - }, - function(data, menu) + ESX.UI.Menu.Open( + 'dialog', GetCurrentResourceName(), 'billing', + { + title = _U('invoice_amount') + }, + function(data, menu) - local amount = tonumber(data.value) + local amount = tonumber(data.value) - if amount == nil then - ESX.ShowNotification(_U('amount_invalid')) - else + if amount == nil then + ESX.ShowNotification(_U('amount_invalid')) + else - menu.close() + menu.close() - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() - if closestPlayer == -1 or closestDistance > 3.0 then - ESX.ShowNotification(_U('no_players_near')) - else - TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', 'Taxi', amount) - end + if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification(_U('no_players_near')) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', 'Taxi', amount) + end - end + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end + end - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) end function OpenGetStocksMenu() - ESX.TriggerServerCallback('esx_taxijob:getStockItems', function(items) + ESX.TriggerServerCallback('esx_taxijob:getStockItems', function(items) - print(json.encode(items)) + print(json.encode(items)) - local elements = {} + local elements = {} - for i=1, #items, 1 do - table.insert(elements, {label = 'x' .. items[i].count .. ' ' .. items[i].label, value = items[i].name}) - end + for i=1, #items, 1 do + table.insert(elements, {label = 'x' .. items[i].count .. ' ' .. items[i].label, value = items[i].name}) + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'stocks_menu', - { - title = 'Taxi Stock', - elements = elements - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'stocks_menu', + { + title = 'Taxi Stock', + elements = elements + }, + function(data, menu) - local itemName = data.current.value + local itemName = data.current.value - ESX.UI.Menu.Open( - 'dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count', - { - title = _U('quantity') - }, - function(data2, menu2) + ESX.UI.Menu.Open( + 'dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count', + { + title = _U('quantity') + }, + function(data2, menu2) - local count = tonumber(data2.value) + local count = tonumber(data2.value) - if count == nil then - ESX.ShowNotification(_U('quantity_invalid')) - else - menu2.close() - menu.close() - OpenGetStocksMenu() + if count == nil then + ESX.ShowNotification(_U('quantity_invalid')) + else + menu2.close() + menu.close() + OpenGetStocksMenu() - TriggerServerEvent('esx_taxijob:getStockItem', itemName, count) - end + TriggerServerEvent('esx_taxijob:getStockItem', itemName, count) + end - end, - function(data2, menu2) - menu2.close() - end - ) + end, + function(data2, menu2) + menu2.close() + end + ) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end) + end) end function OpenPutStocksMenu() - ESX.TriggerServerCallback('esx_taxijob:getPlayerInventory', function(inventory) + ESX.TriggerServerCallback('esx_taxijob:getPlayerInventory', function(inventory) - local elements = {} + local elements = {} - for i=1, #inventory.items, 1 do + for i=1, #inventory.items, 1 do - local item = inventory.items[i] + local item = inventory.items[i] - if item.count > 0 then - table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) - end + if item.count > 0 then + table.insert(elements, {label = item.label .. ' x' .. item.count, type = 'item_standard', value = item.name}) + end - end + end - ESX.UI.Menu.Open( - 'default', GetCurrentResourceName(), 'stocks_menu', - { - title = _U('inventory'), - elements = elements - }, - function(data, menu) + ESX.UI.Menu.Open( + 'default', GetCurrentResourceName(), 'stocks_menu', + { + title = _U('inventory'), + elements = elements + }, + function(data, menu) - local itemName = data.current.value + local itemName = data.current.value - ESX.UI.Menu.Open( - 'dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count', - { - title = _U('quantity') - }, - function(data2, menu2) + ESX.UI.Menu.Open( + 'dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count', + { + title = _U('quantity') + }, + function(data2, menu2) - local count = tonumber(data2.value) + local count = tonumber(data2.value) - if count == nil then - ESX.ShowNotification(_U('quantity_invalid')) - else - menu2.close() - menu.close() - OpenPutStocksMenu() + if count == nil then + ESX.ShowNotification(_U('quantity_invalid')) + else + menu2.close() + menu.close() + OpenPutStocksMenu() - TriggerServerEvent('esx_taxijob:putStockItems', itemName, count) - end + TriggerServerEvent('esx_taxijob:putStockItems', itemName, count) + end - end, - function(data2, menu2) - menu2.close() - end - ) + end, + function(data2, menu2) + menu2.close() + end + ) - end, - function(data, menu) - menu.close() - end - ) + end, + function(data, menu) + menu.close() + end + ) - end) + end) end RegisterNetEvent('esx:playerLoaded') AddEventHandler('esx:playerLoaded', function(xPlayer) - PlayerData = xPlayer + PlayerData = xPlayer end) RegisterNetEvent('esx:setJob') AddEventHandler('esx:setJob', function(job) - PlayerData.job = job + PlayerData.job = job end) AddEventHandler('esx_taxijob:hasEnteredMarker', function(zone) - if zone == 'TaxiActions' then - CurrentAction = 'taxi_actions_menu' - CurrentActionMsg = _U('press_to_open') - CurrentActionData = {} - end + if zone == 'TaxiActions' then + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = _U('press_to_open') + CurrentActionData = {} + end - if zone == 'VehicleDeleter' then + if zone == 'VehicleDeleter' then - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - if IsPedInAnyVehicle(playerPed, false) then - CurrentAction = 'delete_vehicle' - CurrentActionMsg = _U('store_veh') - CurrentActionData = {} - end + if IsPedInAnyVehicle(playerPed, false) then + CurrentAction = 'delete_vehicle' + CurrentActionMsg = _U('store_veh') + CurrentActionData = {} + end - end + end end) AddEventHandler('esx_taxijob:hasExitedMarker', function(zone) - ESX.UI.Menu.CloseAll() - CurrentAction = nil + ESX.UI.Menu.CloseAll() + CurrentAction = nil end) RegisterNetEvent('esx_phone:loaded') AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts) - local specialContact = { - name = 'Taxi', - number = 'taxi', - base64Icon = 'data:image/png;base64,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', - } + local specialContact = { + name = 'Taxi', + number = 'taxi', + base64Icon = 'data:image/png;base64,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', + } - TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon) + TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon) end) -- Create Blips Citizen.CreateThread(function() - local blip = AddBlipForCoord(Config.Zones.TaxiActions.Pos.x, Config.Zones.TaxiActions.Pos.y, Config.Zones.TaxiActions.Pos.z) + local blip = AddBlipForCoord(Config.Zones.TaxiActions.Pos.x, Config.Zones.TaxiActions.Pos.y, Config.Zones.TaxiActions.Pos.z) - SetBlipSprite (blip, 198) - SetBlipDisplay(blip, 4) - SetBlipScale (blip, 1.0) - SetBlipColour (blip, 5) - SetBlipAsShortRange(blip, true) + SetBlipSprite (blip, 198) + SetBlipDisplay(blip, 4) + SetBlipScale (blip, 1.0) + SetBlipColour (blip, 5) + SetBlipAsShortRange(blip, true) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString("Taxi") - EndTextCommandSetBlipName(blip) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString("Taxi") + EndTextCommandSetBlipName(blip) end) -- Display markers Citizen.CreateThread(function() - while true do + while true do - Wait(0) + Wait(0) - if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then + if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then - local coords = GetEntityCoords(GetPlayerPed(-1)) + local coords = GetEntityCoords(GetPlayerPed(-1)) - for k,v in pairs(Config.Zones) do - if(v.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then - DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 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, true, 2, false, false, false, false) - end - end + for k,v in pairs(Config.Zones) do + if(v.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance) then + DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 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, true, 2, false, false, false, false) + end + end - end + end - end + end end) -- Enter / Exit marker events Citizen.CreateThread(function() - while true do + while true do - Wait(0) + Wait(0) - if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then + if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then - local coords = GetEntityCoords(GetPlayerPed(-1)) - local isInMarker = false - local currentZone = nil + local coords = GetEntityCoords(GetPlayerPed(-1)) + local isInMarker = false + local currentZone = nil - for k,v in pairs(Config.Zones) do - if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then - isInMarker = true - currentZone = k - end - end + for k,v in pairs(Config.Zones) do + if(GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < v.Size.x) then + isInMarker = true + currentZone = k + end + end - if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then - HasAlreadyEnteredMarker = true - LastZone = currentZone - TriggerEvent('esx_taxijob:hasEnteredMarker', currentZone) - end + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker = true + LastZone = currentZone + TriggerEvent('esx_taxijob:hasEnteredMarker', currentZone) + end - if not isInMarker and HasAlreadyEnteredMarker then - HasAlreadyEnteredMarker = false - TriggerEvent('esx_taxijob:hasExitedMarker', LastZone) - end + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_taxijob:hasExitedMarker', LastZone) + end - end + end - end + end end) -- Taxi Job Citizen.CreateThread(function() - while true do + while true do - Citizen.Wait(0) + Citizen.Wait(0) - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - if OnJob then + if OnJob then - if CurrentCustomer == nil then + if CurrentCustomer == nil then - DrawSub(_U('drive_search_pass'), 5000) + DrawSub(_U('drive_search_pass'), 5000) - if IsPedInAnyVehicle(playerPed, false) and GetEntitySpeed(playerPed) > 0 then + if IsPedInAnyVehicle(playerPed, false) and GetEntitySpeed(playerPed) > 0 then - local waitUntil = GetGameTimer() + GetRandomIntInRange(30000, 45000) + local waitUntil = GetGameTimer() + GetRandomIntInRange(30000, 45000) - while OnJob and waitUntil > GetGameTimer() do - Citizen.Wait(0) - end + while OnJob and waitUntil > GetGameTimer() do + Citizen.Wait(0) + end - if OnJob and IsPedInAnyVehicle(playerPed, false) and GetEntitySpeed(playerPed) > 0 then + if OnJob and IsPedInAnyVehicle(playerPed, false) and GetEntitySpeed(playerPed) > 0 then - CurrentCustomer = GetRandomWalkingNPC() + CurrentCustomer = GetRandomWalkingNPC() - if CurrentCustomer ~= nil then + if CurrentCustomer ~= nil then - CurrentCustomerBlip = AddBlipForEntity(CurrentCustomer) + CurrentCustomerBlip = AddBlipForEntity(CurrentCustomer) - SetBlipAsFriendly(CurrentCustomerBlip, 1) - SetBlipColour(CurrentCustomerBlip, 2) - SetBlipCategory(CurrentCustomerBlip, 3) - SetBlipRoute(CurrentCustomerBlip, true) + SetBlipAsFriendly(CurrentCustomerBlip, 1) + SetBlipColour(CurrentCustomerBlip, 2) + SetBlipCategory(CurrentCustomerBlip, 3) + SetBlipRoute(CurrentCustomerBlip, true) - SetEntityAsMissionEntity(CurrentCustomer, true, false) - ClearPedTasksImmediately(CurrentCustomer) - SetBlockingOfNonTemporaryEvents(CurrentCustomer, 1) + SetEntityAsMissionEntity(CurrentCustomer, true, false) + ClearPedTasksImmediately(CurrentCustomer) + SetBlockingOfNonTemporaryEvents(CurrentCustomer, 1) - local standTime = GetRandomIntInRange(60000, 180000) + local standTime = GetRandomIntInRange(60000, 180000) - TaskStandStill(CurrentCustomer, standTime) + TaskStandStill(CurrentCustomer, standTime) - ESX.ShowNotification(_U('customer_found')) + ESX.ShowNotification(_U('customer_found')) - end + end - end + end - end + end - else + else - if IsPedFatallyInjured(CurrentCustomer) then + if IsPedFatallyInjured(CurrentCustomer) then - ESX.ShowNotification(_U('client_unconcious')) + ESX.ShowNotification(_U('client_unconcious')) - if DoesBlipExist(CurrentCustomerBlip) then - RemoveBlip(CurrentCustomerBlip) - end + if DoesBlipExist(CurrentCustomerBlip) then + RemoveBlip(CurrentCustomerBlip) + end - if DoesBlipExist(DestinationBlip) then - RemoveBlip(DestinationBlip) - end + if DoesBlipExist(DestinationBlip) then + RemoveBlip(DestinationBlip) + end - SetEntityAsMissionEntity(CurrentCustomer, false, true) + SetEntityAsMissionEntity(CurrentCustomer, false, true) - CurrentCustomer = nil - CurrentCustomerBlip = nil - DestinationBlip = nil - IsNearCustomer = false - CustomerIsEnteringVehicle = false - CustomerEnteredVehicle = false - TargetCoords = nil + CurrentCustomer = nil + CurrentCustomerBlip = nil + DestinationBlip = nil + IsNearCustomer = false + CustomerIsEnteringVehicle = false + CustomerEnteredVehicle = false + TargetCoords = nil - end + end - if IsPedInAnyVehicle(playerPed, false) then + if IsPedInAnyVehicle(playerPed, false) then - local vehicle = GetVehiclePedIsIn(playerPed, false) - local playerCoords = GetEntityCoords(playerPed) - local customerCoords = GetEntityCoords(CurrentCustomer) - local customerDistance = GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, customerCoords.x, customerCoords.y, customerCoords.z) + local vehicle = GetVehiclePedIsIn(playerPed, false) + local playerCoords = GetEntityCoords(playerPed) + local customerCoords = GetEntityCoords(CurrentCustomer) + local customerDistance = GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, customerCoords.x, customerCoords.y, customerCoords.z) - if IsPedSittingInVehicle(CurrentCustomer, vehicle) then + if IsPedSittingInVehicle(CurrentCustomer, vehicle) then - if CustomerEnteredVehicle then + if CustomerEnteredVehicle then - local targetDistance = GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, TargetCoords.x, TargetCoords.y, TargetCoords.z) + local targetDistance = GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, TargetCoords.x, TargetCoords.y, TargetCoords.z) - if targetDistance <= 10.0 then + if targetDistance <= 10.0 then - TaskLeaveVehicle(CurrentCustomer, vehicle, 0) + TaskLeaveVehicle(CurrentCustomer, vehicle, 0) - ESX.ShowNotification(_U('arrive_dest')) + ESX.ShowNotification(_U('arrive_dest')) - TaskGoStraightToCoord(CurrentCustomer, TargetCoords.x, TargetCoords.y, TargetCoords.z, 1.0, -1, 0.0, 0.0) - SetEntityAsMissionEntity(CurrentCustomer, false, true) + TaskGoStraightToCoord(CurrentCustomer, TargetCoords.x, TargetCoords.y, TargetCoords.z, 1.0, -1, 0.0, 0.0) + SetEntityAsMissionEntity(CurrentCustomer, false, true) - TriggerServerEvent('esx_taxijob:success') + TriggerServerEvent('esx_taxijob:success') - RemoveBlip(DestinationBlip) + RemoveBlip(DestinationBlip) - local scope = function(customer) - ESX.SetTimeout(60000, function() - DeletePed(customer) - end) - end + local scope = function(customer) + ESX.SetTimeout(60000, function() + DeletePed(customer) + end) + end - scope(CurrentCustomer) + scope(CurrentCustomer) - CurrentCustomer = nil - CurrentCustomerBlip = nil - DestinationBlip = nil - IsNearCustomer = false - CustomerIsEnteringVehicle = false - CustomerEnteredVehicle = false - TargetCoords = nil + CurrentCustomer = nil + CurrentCustomerBlip = nil + DestinationBlip = nil + IsNearCustomer = false + CustomerIsEnteringVehicle = false + CustomerEnteredVehicle = false + TargetCoords = nil - end + end - if TargetCoords ~= nil then - DrawMarker(1, TargetCoords.x, TargetCoords.y, TargetCoords.z - 1.0, 0, 0, 0, 0, 0, 0, 4.0, 4.0, 2.0, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0) - end + if TargetCoords ~= nil then + DrawMarker(1, TargetCoords.x, TargetCoords.y, TargetCoords.z - 1.0, 0, 0, 0, 0, 0, 0, 4.0, 4.0, 2.0, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0) + end - else + else - RemoveBlip(CurrentCustomerBlip) + RemoveBlip(CurrentCustomerBlip) - CurrentCustomerBlip = nil + CurrentCustomerBlip = nil - TargetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] + TargetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] - local street = table.pack(GetStreetNameAtCoord(TargetCoords.x, TargetCoords.y, TargetCoords.z)) - local msg = nil + local street = table.pack(GetStreetNameAtCoord(TargetCoords.x, TargetCoords.y, TargetCoords.z)) + local msg = nil - if street[2] ~= 0 and street[2] ~= nil then - msg = string.format(_U('take_me_to_near', GetStreetNameFromHashKey(street[1]),GetStreetNameFromHashKey(street[2]))) - else - msg = string.format(_U('take_me_to', GetStreetNameFromHashKey(street[1]))) - end + if street[2] ~= 0 and street[2] ~= nil then + msg = string.format(_U('take_me_to_near', GetStreetNameFromHashKey(street[1]),GetStreetNameFromHashKey(street[2]))) + else + msg = string.format(_U('take_me_to', GetStreetNameFromHashKey(street[1]))) + end - ESX.ShowNotification(msg) + ESX.ShowNotification(msg) - DestinationBlip = AddBlipForCoord(TargetCoords.x, TargetCoords.y, TargetCoords.z) + DestinationBlip = AddBlipForCoord(TargetCoords.x, TargetCoords.y, TargetCoords.z) - BeginTextCommandSetBlipName("STRING") - AddTextComponentString("Destination") - EndTextCommandSetBlipName(blip) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString("Destination") + EndTextCommandSetBlipName(blip) - SetBlipRoute(DestinationBlip, true) + SetBlipRoute(DestinationBlip, true) - CustomerEnteredVehicle = true + CustomerEnteredVehicle = true - end + end - else + else - DrawMarker(1, customerCoords.x, customerCoords.y, customerCoords.z - 1.0, 0, 0, 0, 0, 0, 0, 4.0, 4.0, 2.0, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0) + DrawMarker(1, customerCoords.x, customerCoords.y, customerCoords.z - 1.0, 0, 0, 0, 0, 0, 0, 4.0, 4.0, 2.0, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0) - if not CustomerEnteredVehicle then + if not CustomerEnteredVehicle then - if customerDistance <= 30.0 then + if customerDistance <= 30.0 then - if not IsNearCustomer then - ESX.ShowNotification(_U('close_to_client')) - IsNearCustomer = true - end + if not IsNearCustomer then + ESX.ShowNotification(_U('close_to_client')) + IsNearCustomer = true + end - end + end - if customerDistance <= 100.0 then + if customerDistance <= 100.0 then - if not CustomerIsEnteringVehicle then + if not CustomerIsEnteringVehicle then - ClearPedTasksImmediately(CurrentCustomer) + ClearPedTasksImmediately(CurrentCustomer) - local seat = 0 + local seat = 0 - for i=4, 0, 1 do - if IsVehicleSeatFree(vehicle, seat) then - seat = i - break - end - end + for i=4, 0, 1 do + if IsVehicleSeatFree(vehicle, seat) then + seat = i + break + end + end - TaskEnterVehicle(CurrentCustomer, vehicle, -1, seat, 2.0, 1) + TaskEnterVehicle(CurrentCustomer, vehicle, -1, seat, 2.0, 1) - CustomerIsEnteringVehicle = true + CustomerIsEnteringVehicle = true - end + end - end + end - end + end - end + end - else + else - DrawSub(_U('return_to_veh'), 5000) + DrawSub(_U('return_to_veh'), 5000) - end + end - end + end - end + end - end + end end) -- Key Controls Citizen.CreateThread(function() - while true do + while true do - Citizen.Wait(0) + Citizen.Wait(0) - if CurrentAction ~= nil then + if CurrentAction ~= nil then - SetTextComponentFormat('STRING') - AddTextComponentString(CurrentActionMsg) - DisplayHelpTextFromStringLabel(0, 0, 1, -1) + SetTextComponentFormat('STRING') + AddTextComponentString(CurrentActionMsg) + DisplayHelpTextFromStringLabel(0, 0, 1, -1) - if IsControlPressed(0, Keys['E']) and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' and (GetGameTimer() - GUI.Time) > 300 then + if IsControlPressed(0, Keys['E']) and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' and (GetGameTimer() - GUI.Time) > 300 then - if CurrentAction == 'taxi_actions_menu' then - OpenTaxiActionsMenu() - end + if CurrentAction == 'taxi_actions_menu' then + OpenTaxiActionsMenu() + end - if CurrentAction == 'delete_vehicle' then + if CurrentAction == 'delete_vehicle' then - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - if Config.EnableSocietyOwnedVehicles then - local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) - TriggerServerEvent('esx_society:putVehicleInGarage', 'taxi', vehicleProps) - else - if GetEntityModel(CurrentActionData.vehicle) == GetHashKey('taxi') then - if Config.MaxInService ~= -1 then - TriggerServerEvent('esx_service:disableService', 'taxi') - end - end - end + if Config.EnableSocietyOwnedVehicles then + local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) + TriggerServerEvent('esx_society:putVehicleInGarage', 'taxi', vehicleProps) + else + if GetEntityModel(CurrentActionData.vehicle) == GetHashKey('taxi') then + if Config.MaxInService ~= -1 then + TriggerServerEvent('esx_service:disableService', 'taxi') + end + end + end - ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) - end + end - CurrentAction = nil - GUI.Time = GetGameTimer() + CurrentAction = nil + GUI.Time = GetGameTimer() - end + end - end + end - if IsControlPressed(0, Keys['F6']) and Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' and (GetGameTimer() - GUI.Time) > 150 then - OpenMobileTaxiActionsMenu() - GUI.Time = GetGameTimer() - end + if IsControlPressed(0, Keys['F6']) and Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' and (GetGameTimer() - GUI.Time) > 150 then + OpenMobileTaxiActionsMenu() + GUI.Time = GetGameTimer() + end - if IsControlPressed(0, Keys['DELETE']) and (GetGameTimer() - GUI.Time) > 150 then + if IsControlPressed(0, Keys['DELETE']) and (GetGameTimer() - GUI.Time) > 150 then - if OnJob then - StopTaxiJob() - else + if OnJob then + StopTaxiJob() + else - if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then + if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - if IsPedInAnyVehicle(playerPed, false) then + if IsPedInAnyVehicle(playerPed, false) then - local vehicle = GetVehiclePedIsIn(playerPed, false) + local vehicle = GetVehiclePedIsIn(playerPed, false) - if PlayerData.job.grade >= 3 then - StartTaxiJob() - else - if GetEntityModel(vehicle) == GetHashKey('taxi') then - StartTaxiJob() - else - ESX.ShowNotification(_U('must_in_taxi')) - end - end + if PlayerData.job.grade >= 3 then + StartTaxiJob() + else + if GetEntityModel(vehicle) == GetHashKey('taxi') then + StartTaxiJob() + else + ESX.ShowNotification(_U('must_in_taxi')) + end + end - else + else - if PlayerData.job.grade >= 3 then - ESX.ShowNotification(_U('must_in_vehicle')) - else - ESX.ShowNotification(_U('must_in_taxi')) - end + if PlayerData.job.grade >= 3 then + ESX.ShowNotification(_U('must_in_vehicle')) + else + ESX.ShowNotification(_U('must_in_taxi')) + end - end + end - end + end - end + end - GUI.Time = GetGameTimer() + GUI.Time = GetGameTimer() - end + end - end + end end) diff --git a/config.lua b/config.lua index 3f2be6d9..3757e4df 100644 --- a/config.lua +++ b/config.lua @@ -8,119 +8,119 @@ Config.Locale = 'fr' Config.Zones = { - TaxiActions = { - Pos = {x = 915.039, y = -162.187, z = 73.684}, - Size = {x = 1.5, y = 1.5, z = 1.0}, - Color = {r = 204, g = 204, b = 0}, - Type = 1 - }, + TaxiActions = { + Pos = {x = 915.039, y = -162.187, z = 73.684}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 1 + }, - VehicleSpawnPoint = { - Pos = {x = 911.108, y = -177.867, z = 74.283}, - Size = {x = 1.5, y = 1.5, z = 1.0}, - Type = -1 - }, + VehicleSpawnPoint = { + Pos = {x = 911.108, y = -177.867, z = 74.283}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = -1 + }, - VehicleDeleter = { - Pos = {x = 908.317, y = -183.070, z = 73.201}, - Size = {x = 3.0, y = 3.0, z = 1.0}, - Color = {r = 204, g = 204, b = 0}, - Type = 1 - } + VehicleDeleter = { + Pos = {x = 908.317, y = -183.070, z = 73.201}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 1 + } } Config.JobLocations = { - {x = 293.476, y = -590.163, z = 42.7371}, - {x = 253.404, y = -375.86, z = 44.0819}, - {x = 120.808, y = -300.416, z = 45.1399}, - {x = -38.4132, y = -381.576, z = 38.3456}, - {x = -107.442, y = -614.377, z = 35.6703}, - {x = -252.292, y = -856.474, z = 30.5626}, - {x = -236.138, y = -988.382, z = 28.7749}, - {x = -276.989, y = -1061.18, z = 25.6853}, - {x = -576.451, y = -998.989, z = 21.785}, - {x = -602.798, y = -952.63, z = 21.6353}, - {x = -790.653, y = -961.855, z = 14.8932}, - {x = -912.588, y = -864.756, z = 15.0057}, - {x = -1069.77, y = -792.513, z = 18.8075}, - {x = -1306.94, y = -854.085, z = 15.0959}, - {x = -1468.51, y = -681.363, z = 26.178}, - {x = -1380.89, y = -452.7, z = 34.0843}, - {x = -1326.35, y = -394.81, z = 36.0632}, - {x = -1383.68, y = -269.985, z = 42.4878}, - {x = -1679.61, y = -457.339, z = 39.4048}, - {x = -1812.45, y = -416.917, z = 43.6734}, - {x = -2043.64, y = -268.291, z = 22.9927}, - {x = -2186.45, y = -421.595, z = 12.6776}, - {x = -1862.08, y = -586.528, z = 11.1747}, - {x = -1859.5, y = -617.563, z = 10.8788}, - {x = -1634.95, y = -988.302, z = 12.6241}, - {x = -1283.99, y = -1154.16, z = 5.30998}, - {x = -1126.47, y = -1338.08, z = 4.63434}, - {x = -867.907, y = -1159.67, z = 5.00795}, - {x = -847.55, y = -1141.38, z = 6.27591}, - {x = -722.625, y = -1144.6, z = 10.2176}, - {x = -575.503, y = -318.446, z = 34.5273}, - {x = -592.309, y = -224.853, z = 36.1209}, - {x = -559.594, y = -162.873, z = 37.7547}, - {x = -534.992, y = -65.6695, z = 40.634}, - {x = -758.234, y = -36.6906, z = 37.2911}, - {x = -1375.88, y = 20.9516, z = 53.2255}, - {x = -1320.25, y = -128.018, z = 48.097}, - {x = -1285.71, y = 294.287, z = 64.4619}, - {x = -1245.67, y = 386.533, z = 75.0908}, - {x = -760.355, y = 285.015, z = 85.0667}, - {x = -626.786, y = 254.146, z = 81.0964}, - {x = -563.609, y = 267.962, z = 82.5116}, - {x = -486.806, y = 271.977, z = 82.8187}, - {x = 88.295, y = 250.867, z = 108.188}, - {x = 234.087, y = 344.678, z = 105.018}, - {x = 434.963, y = 96.707, z = 99.1713}, - {x = 482.617, y = -142.533, z = 58.1936}, - {x = 762.651, y = -786.55, z = 25.8915}, - {x = 809.06, y = -1290.8, z = 25.7946}, - {x = 490.819, y = -1751.37, z = 28.0987}, - {x = 432.351, y = -1856.11, z = 27.0352}, - {x = 164.348, y = -1734.54, z = 28.8982}, - {x = -57.6909, y = -1501.4, z = 31.1084}, - {x = 52.2241, y = -1566.65, z = 29.006}, - {x = 310.222, y = -1376.76, z = 31.4442}, - {x = 181.967, y = -1332.79, z = 28.8773}, - {x = -74.6091, y = -1100.64, z = 25.738}, - {x = -887.045, y = -2187.46, z = 8.13248}, - {x = -749.584, y = -2296.59, z = 12.4627}, - {x = -1064.83, y = -2560.66, z = 19.6811}, - {x = -1033.44, y = -2730.24, z = 19.6868}, - {x = -1018.67, y = -2732, z = 13.2687}, - {x = 797.354, y = -174.423, z = 72.708}, - {x = 508.156, y = -117.908, z = 60.78}, - {x = 159.458, y = -27.555, z = 67.38}, - {x = -36.382, y = -106.912, z = 56.982}, - {x = -355.801, y = -270.404, z = 33.011}, - {x = -831.196, y = -76.871, z = 37.323}, - {x = -1038.707, y = -214.593, z = 37}, - {x = 1918.448, y = 3691.41, z = 32.261}, - {x = 1820.217, y = 3697.115, z = 33.493}, - {x = 1619.323, y = 3827.162, z = 34.482}, - {x = 1418.628, y = 3602.243, z = 34.511}, - {x = 1944.858, y = 3856.252, z = 31.741}, - {x = 2285.278, y = 3839.444, z = 34.023}, - {x = 2760.945, y = 3387.813, z = 55.659}, - {x = 1952.819, y = 2627.731, z = 45.368}, - {x = 1051.414, y = 474.833, z = 93.653}, - {x = 866.393, y = 17.635, z = 78.654}, - {x = 318.985, y = 167.41, z = 103.335}, - {x = 88.836, y = 254.054, z = 108.236}, - {x = -44.852, y = 70.414, z = 72.437}, - {x = -115.496, y = 84.333, z = 70.792}, - {x = -384.806, y = 226.868, z = 83.548}, - {x = -578.669, y = 139.085, z = 61.337}, - {x = -651.334, y = -584.879, z = 34.116}, - {x = -571.847, y = -1195.648, z = 17.869}, - {x = -1513.271, y = -670.039, z = 28.362}, - {x = -1297.484, y = -654.913, z = 26.123}, - {x = -1645.546, y = 144.571, z = 61.664}, - {x = -1160.618, y = 744.418, z = 154.571}, - {x = -798.09, y = 831.699, z = 204.351}, + {x = 293.476, y = -590.163, z = 42.7371}, + {x = 253.404, y = -375.86, z = 44.0819}, + {x = 120.808, y = -300.416, z = 45.1399}, + {x = -38.4132, y = -381.576, z = 38.3456}, + {x = -107.442, y = -614.377, z = 35.6703}, + {x = -252.292, y = -856.474, z = 30.5626}, + {x = -236.138, y = -988.382, z = 28.7749}, + {x = -276.989, y = -1061.18, z = 25.6853}, + {x = -576.451, y = -998.989, z = 21.785}, + {x = -602.798, y = -952.63, z = 21.6353}, + {x = -790.653, y = -961.855, z = 14.8932}, + {x = -912.588, y = -864.756, z = 15.0057}, + {x = -1069.77, y = -792.513, z = 18.8075}, + {x = -1306.94, y = -854.085, z = 15.0959}, + {x = -1468.51, y = -681.363, z = 26.178}, + {x = -1380.89, y = -452.7, z = 34.0843}, + {x = -1326.35, y = -394.81, z = 36.0632}, + {x = -1383.68, y = -269.985, z = 42.4878}, + {x = -1679.61, y = -457.339, z = 39.4048}, + {x = -1812.45, y = -416.917, z = 43.6734}, + {x = -2043.64, y = -268.291, z = 22.9927}, + {x = -2186.45, y = -421.595, z = 12.6776}, + {x = -1862.08, y = -586.528, z = 11.1747}, + {x = -1859.5, y = -617.563, z = 10.8788}, + {x = -1634.95, y = -988.302, z = 12.6241}, + {x = -1283.99, y = -1154.16, z = 5.30998}, + {x = -1126.47, y = -1338.08, z = 4.63434}, + {x = -867.907, y = -1159.67, z = 5.00795}, + {x = -847.55, y = -1141.38, z = 6.27591}, + {x = -722.625, y = -1144.6, z = 10.2176}, + {x = -575.503, y = -318.446, z = 34.5273}, + {x = -592.309, y = -224.853, z = 36.1209}, + {x = -559.594, y = -162.873, z = 37.7547}, + {x = -534.992, y = -65.6695, z = 40.634}, + {x = -758.234, y = -36.6906, z = 37.2911}, + {x = -1375.88, y = 20.9516, z = 53.2255}, + {x = -1320.25, y = -128.018, z = 48.097}, + {x = -1285.71, y = 294.287, z = 64.4619}, + {x = -1245.67, y = 386.533, z = 75.0908}, + {x = -760.355, y = 285.015, z = 85.0667}, + {x = -626.786, y = 254.146, z = 81.0964}, + {x = -563.609, y = 267.962, z = 82.5116}, + {x = -486.806, y = 271.977, z = 82.8187}, + {x = 88.295, y = 250.867, z = 108.188}, + {x = 234.087, y = 344.678, z = 105.018}, + {x = 434.963, y = 96.707, z = 99.1713}, + {x = 482.617, y = -142.533, z = 58.1936}, + {x = 762.651, y = -786.55, z = 25.8915}, + {x = 809.06, y = -1290.8, z = 25.7946}, + {x = 490.819, y = -1751.37, z = 28.0987}, + {x = 432.351, y = -1856.11, z = 27.0352}, + {x = 164.348, y = -1734.54, z = 28.8982}, + {x = -57.6909, y = -1501.4, z = 31.1084}, + {x = 52.2241, y = -1566.65, z = 29.006}, + {x = 310.222, y = -1376.76, z = 31.4442}, + {x = 181.967, y = -1332.79, z = 28.8773}, + {x = -74.6091, y = -1100.64, z = 25.738}, + {x = -887.045, y = -2187.46, z = 8.13248}, + {x = -749.584, y = -2296.59, z = 12.4627}, + {x = -1064.83, y = -2560.66, z = 19.6811}, + {x = -1033.44, y = -2730.24, z = 19.6868}, + {x = -1018.67, y = -2732, z = 13.2687}, + {x = 797.354, y = -174.423, z = 72.708}, + {x = 508.156, y = -117.908, z = 60.78}, + {x = 159.458, y = -27.555, z = 67.38}, + {x = -36.382, y = -106.912, z = 56.982}, + {x = -355.801, y = -270.404, z = 33.011}, + {x = -831.196, y = -76.871, z = 37.323}, + {x = -1038.707, y = -214.593, z = 37}, + {x = 1918.448, y = 3691.41, z = 32.261}, + {x = 1820.217, y = 3697.115, z = 33.493}, + {x = 1619.323, y = 3827.162, z = 34.482}, + {x = 1418.628, y = 3602.243, z = 34.511}, + {x = 1944.858, y = 3856.252, z = 31.741}, + {x = 2285.278, y = 3839.444, z = 34.023}, + {x = 2760.945, y = 3387.813, z = 55.659}, + {x = 1952.819, y = 2627.731, z = 45.368}, + {x = 1051.414, y = 474.833, z = 93.653}, + {x = 866.393, y = 17.635, z = 78.654}, + {x = 318.985, y = 167.41, z = 103.335}, + {x = 88.836, y = 254.054, z = 108.236}, + {x = -44.852, y = 70.414, z = 72.437}, + {x = -115.496, y = 84.333, z = 70.792}, + {x = -384.806, y = 226.868, z = 83.548}, + {x = -578.669, y = 139.085, z = 61.337}, + {x = -651.334, y = -584.879, z = 34.116}, + {x = -571.847, y = -1195.648, z = 17.869}, + {x = -1513.271, y = -670.039, z = 28.362}, + {x = -1297.484, y = -654.913, z = 26.123}, + {x = -1645.546, y = 144.571, z = 61.664}, + {x = -1160.618, y = 744.418, z = 154.571}, + {x = -798.09, y = 831.699, z = 204.351}, } diff --git a/locales/br.lua b/locales/br.lua index bcd578e0..41a539f3 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -1,32 +1,30 @@ Locales['br'] = { - - ['taking_service'] = 'Pegando serviço: ', - ['spawn_veh'] = 'pegar veículo', - ['remove_comp_money'] = 'Remover dinheiro da empresa', - ['deposit_money'] = 'Depositar dinheiro', - ['launder_money'] = 'Lavar dinheiro', - ['full_service'] = 'Serviço completo: ', - ['withdraw_amount'] = 'Valor do saque', - ['amount_invalid'] = 'Valor inválido', - ['deposit_amount'] = 'Valor para deposito', - ['launder_amount'] = 'Valor para lavagem', - ['press_to_open'] = 'Pressione ~INPUT_CONTEXT~ para acessar o menu', - ['billing'] = 'Faturamento', - ['invoice_amount'] = 'Valor da fatura', - ['no_players_near'] = 'Nenhum jogador nas proximidades', - ['store_veh'] = 'Pressione ~INPUT_CONTEXT~ para guardar o veículo', - ['drive_search_pass'] = 'Dirigindo em busca de ~y~passageiros', - ['customer_found'] = 'Você ~g~encontrou~s~ um passageiro, dirija até o destino', - ['client_unconcious'] = 'Seu passageiro está ~r~insconsciente~w~. Procure por outro.', - ['arrive_dest'] = 'Você ~g~chegou~s~ ao seu destino', - ['take_me_to_near'] = '~w~Leve me para~y~ %s~w~, perto~y~ %s', - ['take_me_to'] = '~w~Leve me para~y~ %s', - ['close_to_client'] = 'Você está perto do passageiro, aproximisse dele', - ['return_to_veh'] = 'Volte para o seu veículo para continuar a missão', - ['only_taxi'] = 'Você só pode guardar taxis.', - ['must_in_taxi'] = 'Você deve estar em um táxi para começar a missão', - ['must_in_vehicle'] = 'Você deve estar em um veículo para começar a missão', - ['have_earned'] = 'Você ganhou ~g~$', - ['comp_earned'] = 'Sua empresa ganhou ~g~$', - + ['taking_service'] = 'Pegando serviço: ', + ['spawn_veh'] = 'pegar veículo', + ['remove_comp_money'] = 'Remover dinheiro da empresa', + ['deposit_money'] = 'Depositar dinheiro', + ['launder_money'] = 'Lavar dinheiro', + ['full_service'] = 'Serviço completo: ', + ['withdraw_amount'] = 'Valor do saque', + ['amount_invalid'] = 'Valor inválido', + ['deposit_amount'] = 'Valor para deposito', + ['launder_amount'] = 'Valor para lavagem', + ['press_to_open'] = 'Pressione ~INPUT_CONTEXT~ para acessar o menu', + ['billing'] = 'Faturamento', + ['invoice_amount'] = 'Valor da fatura', + ['no_players_near'] = 'Nenhum jogador nas proximidades', + ['store_veh'] = 'Pressione ~INPUT_CONTEXT~ para guardar o veículo', + ['drive_search_pass'] = 'Dirigindo em busca de ~y~passageiros', + ['customer_found'] = 'Você ~g~encontrou~s~ um passageiro, dirija até o destino', + ['client_unconcious'] = 'Seu passageiro está ~r~insconsciente~w~. Procure por outro.', + ['arrive_dest'] = 'Você ~g~chegou~s~ ao seu destino', + ['take_me_to_near'] = '~w~Leve me para~y~ %s~w~, perto~y~ %s', + ['take_me_to'] = '~w~Leve me para~y~ %s', + ['close_to_client'] = 'Você está perto do passageiro, aproximisse dele', + ['return_to_veh'] = 'Volte para o seu veículo para continuar a missão', + ['only_taxi'] = 'Você só pode guardar taxis.', + ['must_in_taxi'] = 'Você deve estar em um táxi para começar a missão', + ['must_in_vehicle'] = 'Você deve estar em um veículo para começar a missão', + ['have_earned'] = 'Você ganhou ~g~$', + ['comp_earned'] = 'Sua empresa ganhou ~g~$', } diff --git a/locales/de.lua b/locales/de.lua index dbf231cd..7f9fd38e 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,32 +1,30 @@ Locales['de'] = { - - ['taking_service'] = 'Service annehmen: ', - ['spawn_veh'] = 'Fahrzeug spawnen', - ['remove_comp_money'] = 'Firmengeld abheben', - ['deposit_money'] = 'Geld einzahlen', - ['launder_money'] = 'Geld waschen', - ['full_service'] = 'Voller Service: ', - ['withdraw_amount'] = 'Betrag zum abheben', - ['amount_invalid'] = 'Betrag ungültig', - ['deposit_amount'] = 'Betrag zum einzahlen', - ['launder_amount'] = 'Betrag zum waschen', - ['press_to_open'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen', - ['billing'] = 'Rechnung', - ['invoice_amount'] = 'Rechnugsbetrag', - ['no_players_near'] = 'Kein Spieler in der Nähe', - ['store_veh'] = 'Drücke ~INPUT_CONTEXT~ um das Fahrzeug zu parken', - ['drive_search_pass'] = 'Auf der Suche nach ~y~Passagieren', - ['customer_found'] = 'du hast einen Passagier ~g~gefunden~s~ , Fahre in zum Ziel', - ['client_unconcious'] = 'dein Passagier ist ~r~bewusstlos~w~. Suche nach einem anderen.', - ['arrive_dest'] = 'du bist an deinem Ziel ~g~angekommen~s~', - ['take_me_to_near'] = '~w~Bring mich nach~y~ %s~w~, in der Nähe von~y~ %s', - ['take_me_to'] = '~w~Bring mich nach~y~ %s', - ['close_to_client'] = 'du bist nahe an dem Passagier, du musst noch näher ran', - ['return_to_veh'] = 'bitte kehre zu deinem Fahezeug zurück umd die Mission fortzuführen', - ['only_taxi'] = 'Du kannst nur Taxis parken.', - ['must_in_taxi'] = 'Du musst in einem Taxis sein umd die Mission starten zu können', - ['must_in_vehicle'] = 'Du musst in einem Fahrzeug sein um die Mission starten zu können', - ['have_earned'] = 'verdient ~g~$', - ['comp_earned'] = 'Die Firma verdient ~g~$', - + ['taking_service'] = 'Service annehmen: ', + ['spawn_veh'] = 'Fahrzeug spawnen', + ['remove_comp_money'] = 'Firmengeld abheben', + ['deposit_money'] = 'Geld einzahlen', + ['launder_money'] = 'Geld waschen', + ['full_service'] = 'Voller Service: ', + ['withdraw_amount'] = 'Betrag zum abheben', + ['amount_invalid'] = 'Betrag ungültig', + ['deposit_amount'] = 'Betrag zum einzahlen', + ['launder_amount'] = 'Betrag zum waschen', + ['press_to_open'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen', + ['billing'] = 'Rechnung', + ['invoice_amount'] = 'Rechnugsbetrag', + ['no_players_near'] = 'Kein Spieler in der Nähe', + ['store_veh'] = 'Drücke ~INPUT_CONTEXT~ um das Fahrzeug zu parken', + ['drive_search_pass'] = 'Auf der Suche nach ~y~Passagieren', + ['customer_found'] = 'du hast einen Passagier ~g~gefunden~s~ , Fahre in zum Ziel', + ['client_unconcious'] = 'dein Passagier ist ~r~bewusstlos~w~. Suche nach einem anderen.', + ['arrive_dest'] = 'du bist an deinem Ziel ~g~angekommen~s~', + ['take_me_to_near'] = '~w~Bring mich nach~y~ %s~w~, in der Nähe von~y~ %s', + ['take_me_to'] = '~w~Bring mich nach~y~ %s', + ['close_to_client'] = 'du bist nahe an dem Passagier, du musst noch näher ran', + ['return_to_veh'] = 'bitte kehre zu deinem Fahezeug zurück umd die Mission fortzuführen', + ['only_taxi'] = 'Du kannst nur Taxis parken.', + ['must_in_taxi'] = 'Du musst in einem Taxis sein umd die Mission starten zu können', + ['must_in_vehicle'] = 'Du musst in einem Fahrzeug sein um die Mission starten zu können', + ['have_earned'] = 'verdient ~g~$', + ['comp_earned'] = 'Die Firma verdient ~g~$', } diff --git a/locales/en.lua b/locales/en.lua index 74eccd5d..12d051cf 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,42 +1,40 @@ Locales['en'] = { - - ['taking_service'] = 'taking service: ', - ['spawn_veh'] = 'spawn vehicle', - ['remove_comp_money'] = 'remove company money', - ['deposit_money'] = 'deposit money', - ['launder_money'] = 'launder money', - ['full_service'] = 'full service: ', - ['withdraw_amount'] = 'amount of withdrawal', - ['amount_invalid'] = 'amount invalid', - ['deposit_amount'] = 'amount to deposit', - ['launder_amount'] = 'amount to launder', - ['press_to_open'] = 'press ~INPUT_CONTEXT~ to access the menu', - ['billing'] = 'billing', - ['invoice_amount'] = 'invoice amount', - ['no_players_near'] = 'no players nearby', - ['store_veh'] = 'press ~INPUT_CONTEXT~ to store the vehicle', - ['drive_search_pass'] = 'driving in search of ~y~passengers', - ['customer_found'] = 'you have ~g~found~s~ a customer, drive until last', - ['client_unconcious'] = 'your client is ~r~unconscious~w~. Look for another one.', - ['arrive_dest'] = 'you have ~g~arrived~s~ at your destination', - ['take_me_to_near'] = '~w~Take me to~y~ %s~w~, near~y~ %s', - ['take_me_to'] = '~w~Take me to~y~ %s', - ['close_to_client'] = 'you are close to the client, get close to them', - ['return_to_veh'] = 'please return to your vehicle to continue the mission', - ['only_taxi'] = 'you can only storee taxis.', - ['must_in_taxi'] = 'you must be in a taxi to start the mission', - ['must_in_vehicle'] = 'you must be in a vehicle to begin the mission', - ['have_earned'] = 'you have earned ~g~$', - ['comp_earned'] = 'your company has earned ~g~$', - ['deposit_stock'] = 'deposit Stock', - ['take_stock'] = 'take Stock', - ['boss_actions'] = 'boss Actions', - ['mission_complete'] = 'mission Completed', - ['quantity'] = 'quantity', - ['quantity_invalid'] = 'invalid Quantity', - ['inventory'] = 'inventory', - ['taxi_client'] = 'taxi Client', - ['have_withdrawn'] = 'you have withdrawn x', - ['added'] = 'you added x', - + ['taking_service'] = 'taking service: ', + ['spawn_veh'] = 'spawn vehicle', + ['remove_comp_money'] = 'remove company money', + ['deposit_money'] = 'deposit money', + ['launder_money'] = 'launder money', + ['full_service'] = 'full service: ', + ['withdraw_amount'] = 'amount of withdrawal', + ['amount_invalid'] = 'amount invalid', + ['deposit_amount'] = 'amount to deposit', + ['launder_amount'] = 'amount to launder', + ['press_to_open'] = 'press ~INPUT_CONTEXT~ to access the menu', + ['billing'] = 'billing', + ['invoice_amount'] = 'invoice amount', + ['no_players_near'] = 'no players nearby', + ['store_veh'] = 'press ~INPUT_CONTEXT~ to store the vehicle', + ['drive_search_pass'] = 'driving in search of ~y~passengers', + ['customer_found'] = 'you have ~g~found~s~ a customer, drive until last', + ['client_unconcious'] = 'your client is ~r~unconscious~w~. Look for another one.', + ['arrive_dest'] = 'you have ~g~arrived~s~ at your destination', + ['take_me_to_near'] = '~w~Take me to~y~ %s~w~, near~y~ %s', + ['take_me_to'] = '~w~Take me to~y~ %s', + ['close_to_client'] = 'you are close to the client, get close to them', + ['return_to_veh'] = 'please return to your vehicle to continue the mission', + ['only_taxi'] = 'you can only storee taxis.', + ['must_in_taxi'] = 'you must be in a taxi to start the mission', + ['must_in_vehicle'] = 'you must be in a vehicle to begin the mission', + ['have_earned'] = 'you have earned ~g~$', + ['comp_earned'] = 'your company has earned ~g~$', + ['deposit_stock'] = 'deposit Stock', + ['take_stock'] = 'take Stock', + ['boss_actions'] = 'boss Actions', + ['mission_complete'] = 'mission Completed', + ['quantity'] = 'quantity', + ['quantity_invalid'] = 'invalid Quantity', + ['inventory'] = 'inventory', + ['taxi_client'] = 'taxi Client', + ['have_withdrawn'] = 'you have withdrawn x', + ['added'] = 'you added x', } diff --git a/locales/fr.lua b/locales/fr.lua index fe238144..88f524df 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -1,42 +1,40 @@ Locales['fr'] = { - - ['taking_service'] = 'prise de service : ', - ['spawn_veh'] = 'sortir véhicule', - ['remove_comp_money'] = 'retirer argent société', - ['deposit_money'] = 'déposer argent', - ['launder_money'] = 'blanchir argent', - ['full_service'] = 'service complet : ', - ['withdraw_amount'] = 'montant du retrait', - ['amount_invalid'] = 'montant invalide', - ['deposit_amount'] = 'montant du dépôt', - ['launder_amount'] = 'montant à blanchir', - ['press_to_open'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu', - ['billing'] = 'facuration', - ['invoice_amount'] = 'montant de la facture', - ['no_players_near'] = 'aucun joueur à proximité', - ['store_veh'] = 'appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule', - ['drive_search_pass'] = 'conduisez à la recherche de ~y~passagers', - ['customer_found'] = 'vous avez ~g~trouvé~s~ un client, conduisez jusqu\'à ce dernier', - ['client_unconcious'] = 'votre client est ~r~inconscient~w~. Cherchez-en un autre.', - ['arrive_dest'] = 'vous êtes ~g~arrivé~s~ à destination', - ['take_me_to_near'] = '~w~Emmenez-moi à~y~ %s~w~, près de~y~ %s', - ['take_me_to'] = '~w~Emmenez-moi à~y~ %s', - ['close_to_client'] = 'vous êtes à proximité du client, approchez-vous de lui', - ['return_to_veh'] = 'veuillez remonter dans votre véhicule pour continuer la mission', - ['only_taxi'] = 'vous ne pouvez ranger que les taxi', - ['must_in_taxi'] = 'vous devez être dans un taxi pour commencer la mission', - ['must_in_vehicle'] = 'vous devez être dans un véhicule pour commencer la mission', - ['have_earned'] = 'vous avez gagné ~g~$', - ['comp_earned'] = 'votre société a gagné ~g~$', - ['deposit_stock'] = 'Déposer Stock', - ['take_stock'] = 'Prendre Stock', - ['boss_actions'] = 'action Patron', - ['mission_complete'] = 'Mission terminée', - ['quantity'] = 'Quantité', - ['quantity_invalid'] = 'Quantité invalide', - ['inventory'] = 'Inventaire', - ['taxi_client'] = 'client Taxi', - ['have_withdrawn'] = 'Vous avez retiré x', - ['added'] = 'Vous avez ajouté x', - + ['taking_service'] = 'prise de service : ', + ['spawn_veh'] = 'sortir véhicule', + ['remove_comp_money'] = 'retirer argent société', + ['deposit_money'] = 'déposer argent', + ['launder_money'] = 'blanchir argent', + ['full_service'] = 'service complet : ', + ['withdraw_amount'] = 'montant du retrait', + ['amount_invalid'] = 'montant invalide', + ['deposit_amount'] = 'montant du dépôt', + ['launder_amount'] = 'montant à blanchir', + ['press_to_open'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu', + ['billing'] = 'facuration', + ['invoice_amount'] = 'montant de la facture', + ['no_players_near'] = 'aucun joueur à proximité', + ['store_veh'] = 'appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule', + ['drive_search_pass'] = 'conduisez à la recherche de ~y~passagers', + ['customer_found'] = 'vous avez ~g~trouvé~s~ un client, conduisez jusqu\'à ce dernier', + ['client_unconcious'] = 'votre client est ~r~inconscient~w~. Cherchez-en un autre.', + ['arrive_dest'] = 'vous êtes ~g~arrivé~s~ à destination', + ['take_me_to_near'] = '~w~Emmenez-moi à~y~ %s~w~, près de~y~ %s', + ['take_me_to'] = '~w~Emmenez-moi à~y~ %s', + ['close_to_client'] = 'vous êtes à proximité du client, approchez-vous de lui', + ['return_to_veh'] = 'veuillez remonter dans votre véhicule pour continuer la mission', + ['only_taxi'] = 'vous ne pouvez ranger que les taxi', + ['must_in_taxi'] = 'vous devez être dans un taxi pour commencer la mission', + ['must_in_vehicle'] = 'vous devez être dans un véhicule pour commencer la mission', + ['have_earned'] = 'vous avez gagné ~g~$', + ['comp_earned'] = 'votre société a gagné ~g~$', + ['deposit_stock'] = 'Déposer Stock', + ['take_stock'] = 'Prendre Stock', + ['boss_actions'] = 'action Patron', + ['mission_complete'] = 'Mission terminée', + ['quantity'] = 'Quantité', + ['quantity_invalid'] = 'Quantité invalide', + ['inventory'] = 'Inventaire', + ['taxi_client'] = 'client Taxi', + ['have_withdrawn'] = 'Vous avez retiré x', + ['added'] = 'Vous avez ajouté x', } diff --git a/localization/de_config.lua b/localization/de_config.lua index eb2f05ce..3ceb4f63 100644 --- a/localization/de_config.lua +++ b/localization/de_config.lua @@ -7,119 +7,119 @@ Config.Locale = 'de' Config.Zones = { - TaxiActions = { - Pos = {x = 915.039, y = -162.187, z = 73.684}, - Size = {x = 1.5, y = 1.5, z = 1.0}, - Color = {r = 204, g = 204, b = 0}, - Type = 1 - }, + TaxiActions = { + Pos = {x = 915.039, y = -162.187, z = 73.684}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 1 + }, - VehicleSpawnPoint = { - Pos = {x = 911.108, y = -177.867, z = 74.283}, - Size = {x = 1.5, y = 1.5, z = 1.0}, - Type = -1 - }, + VehicleSpawnPoint = { + Pos = {x = 911.108, y = -177.867, z = 74.283}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = -1 + }, - VehicleDeleter = { - Pos = {x = 908.317, y = -183.070, z = 73.201}, - Size = {x = 3.0, y = 3.0, z = 1.0}, - Color = {r = 204, g = 204, b = 0}, - Type = 1 - } + VehicleDeleter = { + Pos = {x = 908.317, y = -183.070, z = 73.201}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 1 + } } Config.JobLocations = { - {x = 293.476, y = -590.163, z = 42.7371}, - {x = 253.404, y = -375.86, z = 44.0819}, - {x = 120.808, y = -300.416, z = 45.1399}, - {x = -38.4132, y = -381.576, z = 38.3456}, - {x = -107.442, y = -614.377, z = 35.6703}, - {x = -252.292, y = -856.474, z = 30.5626}, - {x = -236.138, y = -988.382, z = 28.7749}, - {x = -276.989, y = -1061.18, z = 25.6853}, - {x = -576.451, y = -998.989, z = 21.785}, - {x = -602.798, y = -952.63, z = 21.6353}, - {x = -790.653, y = -961.855, z = 14.8932}, - {x = -912.588, y = -864.756, z = 15.0057}, - {x = -1069.77, y = -792.513, z = 18.8075}, - {x = -1306.94, y = -854.085, z = 15.0959}, - {x = -1468.51, y = -681.363, z = 26.178}, - {x = -1380.89, y = -452.7, z = 34.0843}, - {x = -1326.35, y = -394.81, z = 36.0632}, - {x = -1383.68, y = -269.985, z = 42.4878}, - {x = -1679.61, y = -457.339, z = 39.4048}, - {x = -1812.45, y = -416.917, z = 43.6734}, - {x = -2043.64, y = -268.291, z = 22.9927}, - {x = -2186.45, y = -421.595, z = 12.6776}, - {x = -1862.08, y = -586.528, z = 11.1747}, - {x = -1859.5, y = -617.563, z = 10.8788}, - {x = -1634.95, y = -988.302, z = 12.6241}, - {x = -1283.99, y = -1154.16, z = 5.30998}, - {x = -1126.47, y = -1338.08, z = 4.63434}, - {x = -867.907, y = -1159.67, z = 5.00795}, - {x = -847.55, y = -1141.38, z = 6.27591}, - {x = -722.625, y = -1144.6, z = 10.2176}, - {x = -575.503, y = -318.446, z = 34.5273}, - {x = -592.309, y = -224.853, z = 36.1209}, - {x = -559.594, y = -162.873, z = 37.7547}, - {x = -534.992, y = -65.6695, z = 40.634}, - {x = -758.234, y = -36.6906, z = 37.2911}, - {x = -1375.88, y = 20.9516, z = 53.2255}, - {x = -1320.25, y = -128.018, z = 48.097}, - {x = -1285.71, y = 294.287, z = 64.4619}, - {x = -1245.67, y = 386.533, z = 75.0908}, - {x = -760.355, y = 285.015, z = 85.0667}, - {x = -626.786, y = 254.146, z = 81.0964}, - {x = -563.609, y = 267.962, z = 82.5116}, - {x = -486.806, y = 271.977, z = 82.8187}, - {x = 88.295, y = 250.867, z = 108.188}, - {x = 234.087, y = 344.678, z = 105.018}, - {x = 434.963, y = 96.707, z = 99.1713}, - {x = 482.617, y = -142.533, z = 58.1936}, - {x = 762.651, y = -786.55, z = 25.8915}, - {x = 809.06, y = -1290.8, z = 25.7946}, - {x = 490.819, y = -1751.37, z = 28.0987}, - {x = 432.351, y = -1856.11, z = 27.0352}, - {x = 164.348, y = -1734.54, z = 28.8982}, - {x = -57.6909, y = -1501.4, z = 31.1084}, - {x = 52.2241, y = -1566.65, z = 29.006}, - {x = 310.222, y = -1376.76, z = 31.4442}, - {x = 181.967, y = -1332.79, z = 28.8773}, - {x = -74.6091, y = -1100.64, z = 25.738}, - {x = -887.045, y = -2187.46, z = 8.13248}, - {x = -749.584, y = -2296.59, z = 12.4627}, - {x = -1064.83, y = -2560.66, z = 19.6811}, - {x = -1033.44, y = -2730.24, z = 19.6868}, - {x = -1018.67, y = -2732, z = 13.2687}, - {x = 797.354, y = -174.423, z = 72.708}, - {x = 508.156, y = -117.908, z = 60.78}, - {x = 159.458, y = -27.555, z = 67.38}, - {x = -36.382, y = -106.912, z = 56.982}, - {x = -355.801, y = -270.404, z = 33.011}, - {x = -831.196, y = -76.871, z = 37.323}, - {x = -1038.707, y = -214.593, z = 37}, - {x = 1918.448, y = 3691.41, z = 32.261}, - {x = 1820.217, y = 3697.115, z = 33.493}, - {x = 1619.323, y = 3827.162, z = 34.482}, - {x = 1418.628, y = 3602.243, z = 34.511}, - {x = 1944.858, y = 3856.252, z = 31.741}, - {x = 2285.278, y = 3839.444, z = 34.023}, - {x = 2760.945, y = 3387.813, z = 55.659}, - {x = 1952.819, y = 2627.731, z = 45.368}, - {x = 1051.414, y = 474.833, z = 93.653}, - {x = 866.393, y = 17.635, z = 78.654}, - {x = 318.985, y = 167.41, z = 103.335}, - {x = 88.836, y = 254.054, z = 108.236}, - {x = -44.852, y = 70.414, z = 72.437}, - {x = -115.496, y = 84.333, z = 70.792}, - {x = -384.806, y = 226.868, z = 83.548}, - {x = -578.669, y = 139.085, z = 61.337}, - {x = -651.334, y = -584.879, z = 34.116}, - {x = -571.847, y = -1195.648, z = 17.869}, - {x = -1513.271, y = -670.039, z = 28.362}, - {x = -1297.484, y = -654.913, z = 26.123}, - {x = -1645.546, y = 144.571, z = 61.664}, - {x = -1160.618, y = 744.418, z = 154.571}, - {x = -798.09, y = 831.699, z = 204.351}, + {x = 293.476, y = -590.163, z = 42.7371}, + {x = 253.404, y = -375.86, z = 44.0819}, + {x = 120.808, y = -300.416, z = 45.1399}, + {x = -38.4132, y = -381.576, z = 38.3456}, + {x = -107.442, y = -614.377, z = 35.6703}, + {x = -252.292, y = -856.474, z = 30.5626}, + {x = -236.138, y = -988.382, z = 28.7749}, + {x = -276.989, y = -1061.18, z = 25.6853}, + {x = -576.451, y = -998.989, z = 21.785}, + {x = -602.798, y = -952.63, z = 21.6353}, + {x = -790.653, y = -961.855, z = 14.8932}, + {x = -912.588, y = -864.756, z = 15.0057}, + {x = -1069.77, y = -792.513, z = 18.8075}, + {x = -1306.94, y = -854.085, z = 15.0959}, + {x = -1468.51, y = -681.363, z = 26.178}, + {x = -1380.89, y = -452.7, z = 34.0843}, + {x = -1326.35, y = -394.81, z = 36.0632}, + {x = -1383.68, y = -269.985, z = 42.4878}, + {x = -1679.61, y = -457.339, z = 39.4048}, + {x = -1812.45, y = -416.917, z = 43.6734}, + {x = -2043.64, y = -268.291, z = 22.9927}, + {x = -2186.45, y = -421.595, z = 12.6776}, + {x = -1862.08, y = -586.528, z = 11.1747}, + {x = -1859.5, y = -617.563, z = 10.8788}, + {x = -1634.95, y = -988.302, z = 12.6241}, + {x = -1283.99, y = -1154.16, z = 5.30998}, + {x = -1126.47, y = -1338.08, z = 4.63434}, + {x = -867.907, y = -1159.67, z = 5.00795}, + {x = -847.55, y = -1141.38, z = 6.27591}, + {x = -722.625, y = -1144.6, z = 10.2176}, + {x = -575.503, y = -318.446, z = 34.5273}, + {x = -592.309, y = -224.853, z = 36.1209}, + {x = -559.594, y = -162.873, z = 37.7547}, + {x = -534.992, y = -65.6695, z = 40.634}, + {x = -758.234, y = -36.6906, z = 37.2911}, + {x = -1375.88, y = 20.9516, z = 53.2255}, + {x = -1320.25, y = -128.018, z = 48.097}, + {x = -1285.71, y = 294.287, z = 64.4619}, + {x = -1245.67, y = 386.533, z = 75.0908}, + {x = -760.355, y = 285.015, z = 85.0667}, + {x = -626.786, y = 254.146, z = 81.0964}, + {x = -563.609, y = 267.962, z = 82.5116}, + {x = -486.806, y = 271.977, z = 82.8187}, + {x = 88.295, y = 250.867, z = 108.188}, + {x = 234.087, y = 344.678, z = 105.018}, + {x = 434.963, y = 96.707, z = 99.1713}, + {x = 482.617, y = -142.533, z = 58.1936}, + {x = 762.651, y = -786.55, z = 25.8915}, + {x = 809.06, y = -1290.8, z = 25.7946}, + {x = 490.819, y = -1751.37, z = 28.0987}, + {x = 432.351, y = -1856.11, z = 27.0352}, + {x = 164.348, y = -1734.54, z = 28.8982}, + {x = -57.6909, y = -1501.4, z = 31.1084}, + {x = 52.2241, y = -1566.65, z = 29.006}, + {x = 310.222, y = -1376.76, z = 31.4442}, + {x = 181.967, y = -1332.79, z = 28.8773}, + {x = -74.6091, y = -1100.64, z = 25.738}, + {x = -887.045, y = -2187.46, z = 8.13248}, + {x = -749.584, y = -2296.59, z = 12.4627}, + {x = -1064.83, y = -2560.66, z = 19.6811}, + {x = -1033.44, y = -2730.24, z = 19.6868}, + {x = -1018.67, y = -2732, z = 13.2687}, + {x = 797.354, y = -174.423, z = 72.708}, + {x = 508.156, y = -117.908, z = 60.78}, + {x = 159.458, y = -27.555, z = 67.38}, + {x = -36.382, y = -106.912, z = 56.982}, + {x = -355.801, y = -270.404, z = 33.011}, + {x = -831.196, y = -76.871, z = 37.323}, + {x = -1038.707, y = -214.593, z = 37}, + {x = 1918.448, y = 3691.41, z = 32.261}, + {x = 1820.217, y = 3697.115, z = 33.493}, + {x = 1619.323, y = 3827.162, z = 34.482}, + {x = 1418.628, y = 3602.243, z = 34.511}, + {x = 1944.858, y = 3856.252, z = 31.741}, + {x = 2285.278, y = 3839.444, z = 34.023}, + {x = 2760.945, y = 3387.813, z = 55.659}, + {x = 1952.819, y = 2627.731, z = 45.368}, + {x = 1051.414, y = 474.833, z = 93.653}, + {x = 866.393, y = 17.635, z = 78.654}, + {x = 318.985, y = 167.41, z = 103.335}, + {x = 88.836, y = 254.054, z = 108.236}, + {x = -44.852, y = 70.414, z = 72.437}, + {x = -115.496, y = 84.333, z = 70.792}, + {x = -384.806, y = 226.868, z = 83.548}, + {x = -578.669, y = 139.085, z = 61.337}, + {x = -651.334, y = -584.879, z = 34.116}, + {x = -571.847, y = -1195.648, z = 17.869}, + {x = -1513.271, y = -670.039, z = 28.362}, + {x = -1297.484, y = -654.913, z = 26.123}, + {x = -1645.546, y = 144.571, z = 61.664}, + {x = -1160.618, y = 744.418, z = 154.571}, + {x = -798.09, y = 831.699, z = 204.351}, } diff --git a/server/main.lua b/server/main.lua index d8fc9b1f..e8cd41b3 100644 --- a/server/main.lua +++ b/server/main.lua @@ -3,7 +3,7 @@ ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) if Config.MaxInService ~= -1 then - TriggerEvent('esx_service:activateService', 'taxi', Config.MaxInService) + TriggerEvent('esx_service:activateService', 'taxi', Config.MaxInService) end TriggerEvent('esx_phone:registerNumber', 'taxi', _U('taxi_client'), true, true) @@ -12,99 +12,99 @@ TriggerEvent('esx_society:registerSociety', 'taxi', 'Taxi', 'society_taxi', 'soc RegisterServerEvent('esx_taxijob:success') AddEventHandler('esx_taxijob:success', function() - math.randomseed(os.time()) + math.randomseed(os.time()) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) local total = math.random(Config.NPCJobEarnings.min, Config.NPCJobEarnings.max); local societyAccount = nil if xPlayer.job.grade >= 3 then - total = total * 2 + total = total * 2 end TriggerEvent('esx_addonaccount:getSharedAccount', 'society_taxi', function(account) - societyAccount = account + societyAccount = account end) if societyAccount ~= nil then - local playerMoney = math.floor(total / 100 * 30) - local societyMoney = math.floor(total / 100 * 70) + local playerMoney = math.floor(total / 100 * 30) + local societyMoney = math.floor(total / 100 * 70) - xPlayer.addMoney(playerMoney) - societyAccount.addMoney(societyMoney) + xPlayer.addMoney(playerMoney) + societyAccount.addMoney(societyMoney) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_earned') .. playerMoney) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('comp_earned') .. societyMoney) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_earned') .. playerMoney) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('comp_earned') .. societyMoney) - else + else - xPlayer.addMoney(total) - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_earned') .. total) + xPlayer.addMoney(total) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_earned') .. total) - end + end end) RegisterServerEvent('esx_taxijob:getStockItem') AddEventHandler('esx_taxijob:getStockItem', function(itemName, count) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) - local item = inventory.getItem(itemName) + local item = inventory.getItem(itemName) - if item.count >= count then - inventory.removeItem(itemName, count) - xPlayer.addInventoryItem(itemName, count) - else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid')) - end + if item.count >= count then + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + else + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid')) + end - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn') .. count .. ' ' .. item.label) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn') .. count .. ' ' .. item.label) - end) + end) end) ESX.RegisterServerCallback('esx_taxijob:getStockItems', function(source, cb) - TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) - cb(inventory.items) - end) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + cb(inventory.items) + end) end) RegisterServerEvent('esx_taxijob:putStockItems') AddEventHandler('esx_taxijob:putStockItems', function(itemName, count) - local xPlayer = ESX.GetPlayerFromId(source) + local xPlayer = ESX.GetPlayerFromId(source) - TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) - local item = inventory.getItem(itemName) + local item = inventory.getItem(itemName) - if item.count >= 0 then - xPlayer.removeInventoryItem(itemName, count) - inventory.addItem(itemName, count) - else - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid')) - end + if item.count >= 0 then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + else + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid')) + end - TriggerClientEvent('esx:showNotification', xPlayer.source, _U('added') .. count .. ' ' .. item.label) + TriggerClientEvent('esx:showNotification', xPlayer.source, _U('added') .. count .. ' ' .. item.label) - end) + end) end) ESX.RegisterServerCallback('esx_taxijob:getPlayerInventory', function(source, cb) - local xPlayer = ESX.GetPlayerFromId(source) - local items = xPlayer.inventory + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory - cb({ - items = items - }) + cb({ + items = items + }) -end) \ No newline at end of file +end)