Implemented authorized vehicles, added cloakroom, moved circles

This commit is contained in:
ElPumpo
2018-08-13 13:32:57 +02:00
parent 983a0a4c1b
commit f7f34600ad
9 changed files with 338 additions and 234 deletions
+206 -195
View File
@@ -34,7 +34,7 @@ Citizen.CreateThread(function()
Citizen.Wait(0)
end
Citizen.Wait(5000)
Citizen.Wait(1000)
PlayerData = ESX.GetPlayerData()
end)
@@ -88,36 +88,32 @@ function GetRandomWalkingNPC()
end
function ClearCurrentMission()
if DoesBlipExist(CurrentCustomerBlip) then
RemoveBlip(CurrentCustomerBlip)
end
if DoesBlipExist(CurrentCustomerBlip) then
RemoveBlip(CurrentCustomerBlip)
end
if DoesBlipExist(DestinationBlip) then
RemoveBlip(DestinationBlip)
end
CurrentCustomer = nil
CurrentCustomerBlip = nil
DestinationBlip = nil
IsNearCustomer = false
CustomerIsEnteringVehicle = false
CustomerEnteredVehicle = false
TargetCoords = nil
if DoesBlipExist(DestinationBlip) then
RemoveBlip(DestinationBlip)
end
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 = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) and CurrentCustomer ~= nil then
local vehicle = GetVehiclePedIsIn(playerPed, false)
@@ -133,141 +129,152 @@ function StopTaxiJob()
DrawSub(_U('mission_complete'), 5000)
end
function OpenCloakroom()
ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'taxi_cloakroom',
{
title = _U('cloakroom_menu'),
align = 'top-left',
elements = {
{ label = _U('wear_citizen'), value = 'wear_citizen' },
{ label = _U('wear_work'), value = 'wear_work'}
}
}, function(data, menu)
if data.current.value == 'wear_citizen' then
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
TriggerEvent('skinchanger:loadSkin', skin)
end)
elseif data.current.value == 'wear_citizen' 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
end, function(data, menu)
menu.close()
CurrentAction = 'cloakroom'
CurrentActionMsg = _U('cloakroom_prompt')
CurrentActionData = {}
end)
end
function OpenVehicleSpawnerMenu()
ESX.UI.Menu.CloseAll()
local elements = {}
if Config.EnableSocietyOwnedVehicles then
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
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_spawner',
{
title = _U('spawn_veh'),
align = 'top-left',
elements = elements
}, function(data, menu)
if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then
ESX.ShowNotification(_U('spawnpoint_blocked'))
return
end
menu.close()
local vehicleProps = data.current.value
ESX.Game.SpawnVehicle(vehicleProps.model, Config.Zones.VehicleSpawnPoint.Pos, Config.Zones.VehicleSpawnPoint.Heading, function(vehicle)
ESX.Game.SetVehicleProperties(vehicle, vehicleProps)
local playerPed = PlayerPedId()
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
end)
TriggerServerEvent('esx_society:removeVehicleFromGarage', 'taxi', vehicleProps)
end, function(data, menu)
CurrentAction = 'vehicle_spawner'
CurrentActionMsg = _U('spawner_prompt')
CurrentActionData = {}
menu.close()
end)
end, 'taxi')
else -- not society vehicles
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_spawner',
{
title = _U('spawn_veh'),
align = 'top-left',
elements = Config.AuthorizedVehicles
}, function(data, menu)
if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then
ESX.ShowNotification(_U('spawnpoint_blocked'))
return
end
menu.close()
ESX.Game.SpawnVehicle(data.current.model, Config.Zones.VehicleSpawnPoint.Pos, Config.Zones.VehicleSpawnPoint.Heading, function(vehicle)
local playerPed = PlayerPedId()
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
end)
end, function(data, menu)
CurrentAction = 'vehicle_spawner'
CurrentActionMsg = _U('spawner_prompt')
CurrentActionData = {}
menu.close()
end)
end
end
function OpenTaxiActionsMenu()
local elements = {
{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',
align = 'top-left',
elements = elements
}, function(data, menu)
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'taxi_actions',
{
title = 'Taxi',
align = 'top-left',
elements = elements
},
function(data, menu)
if data.current.value == 'put_stock' then
OpenPutStocksMenu()
elseif data.current.value == 'get_stock' then
OpenGetStocksMenu()
elseif data.current.value == 'boss_actions' then
TriggerEvent('esx_society:openBossMenu', 'taxi', function(data, menu)
menu.close()
end)
end
if data.current.value == 'put_stock' then
OpenPutStocksMenu()
end
if data.current.value == 'get_stock' then
OpenGetStocksMenu()
end
if data.current.value == 'spawn_vehicle' then
if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then
ESX.ShowNotification(_U('spawnpoint_blocked'))
return
end
if Config.EnableSocietyOwnedVehicles then
local elements = {}
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
ESX.UI.Menu.Open(
'default', GetCurrentResourceName(), 'vehicle_spawner',
{
title = _U('spawn_veh'),
align = 'top-left',
elements = elements
},
function(data, menu)
menu.close()
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)
TriggerServerEvent('esx_society:removeVehicleFromGarage', 'taxi', vehicleProps)
end,
function(data, menu)
menu.close()
end
)
end, 'taxi')
else
menu.close()
if Config.MaxInService == -1 then
local playerPed = GetPlayerPed(-1)
local coords = Config.Zones.VehicleSpawnPoint.Pos
ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle)
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
end)
else
ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount)
if canTakeService then
local playerPed = GetPlayerPed(-1)
local coords = Config.Zones.VehicleSpawnPoint.Pos
ESX.Game.SpawnVehicle('taxi', coords, 225.0, function(vehicle)
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
end)
else
ESX.ShowNotification(_U('full_service') .. inServiceCount .. '/' .. maxInService)
end
end, 'taxi')
end
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)
menu.close()
CurrentAction = 'taxi_actions_menu'
CurrentActionMsg = _U('press_to_open')
CurrentActionData = {}
end
)
end, function(data, menu)
menu.close()
CurrentAction = 'taxi_actions_menu'
CurrentActionMsg = _U('press_to_open')
CurrentActionData = {}
end)
end
function OpenMobileTaxiActionsMenu()
@@ -449,70 +456,71 @@ 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 == 'VehicleSpawner' then
CurrentAction = 'vehicle_spawner'
CurrentActionMsg = _U('spawner_prompt')
CurrentActionData = {}
elseif zone == 'VehicleDeleter' then
local playerPed = PlayerPedId()
local vehicle = GetVehiclePedIsIn(playerPed, false)
if zone == 'VehicleDeleter' then
if IsPedInAnyVehicle(playerPed, false) and GetPedInVehicleSeat(vehicle, -1) == playerPed then
CurrentAction = 'delete_vehicle'
CurrentActionMsg = _U('store_veh')
CurrentActionData = { vehicle = vehicle }
end
elseif zone == 'TaxiActions' then
CurrentAction = 'taxi_actions_menu'
CurrentActionMsg = _U('press_to_open')
CurrentActionData = {}
local playerPed = GetPlayerPed(-1)
local vehicle = GetVehiclePedIsIn(playerPed, false)
if IsPedInAnyVehicle(playerPed, false) then
CurrentAction = 'delete_vehicle'
CurrentActionMsg = _U('store_veh')
CurrentActionData = { vehicle = vehicle }
end
end
elseif zone == 'Cloakroom' then
CurrentAction = 'cloakroom'
CurrentActionMsg = _U('cloakroom_prompt')
CurrentActionData = {}
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,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGGElEQVR4XsWWW2gd1xWGv7Vn5pyRj47ut8iOYlmyWxw1KSZN4riOW6eFuCYldaBtIL1Ag4NNmt5ICORCaNKXlF6oCy0hpSoJKW4bp7Sk6YNb01RuLq4d0pQ0kWQrshVJ1uX46HJ0zpy5rCKfQYgjCUs4kA+GtTd786+ftW8jqsqHibB6TLZn2zeq09ZTWAIWCxACoTI1E+6v+eSpXwHRqkVZPcmqlBzCApLQ8dk3IWVKMQlYcHG81OODNmD6D7d9VQrTSbwsH73lFKePtvOxXSfn48U+Xpb58fl5gPmgl6DiR19PZN4+G7iODY4liIAACqiCHyp+AFvb7ML3uot1QP5yDUim292RtIqfU6Lr8wFVDVV8AsPKRDAxzYkKm2kj5sSFuUT3+v2FXkDXakD6f+7c1NGS7Ml0Pkah6jq8mhvwUy7Cyijg5Aoks6/hTp+k7vRjDJ73dmw8WHxlJRM2y5Nsb3GPDuzsZURbGMsUmRkoUPByCMrKCG7SobJiO01X7OKq6utoe3XX34BaoLDaCljj3faTcu3j3z3T+iADwzNYEmKIWcGAIAtqqkKAxZa2Sja/tY+59/7y48aveQ8A4Woq4Fa3bj7Q1/EgwWRAZ52NMTYCWAZEwIhBUEQgUiVQ8IpKvqj4kVJCyGRCRrb+hvap+gPAo0DuUhWQfx2q29u+t/vPmarbCLwII7qQTEQRLbUtBJ2PAkZARBADqkLBV/I+BGrhpoSN577FWz3P3XbTvRMvAlpuwC4crv5jwtK9RAFSu46+G8cRwESxQ+K2gESAgCiIASHuA8YCBdSUohdCKGCF0H6iGc3MgrEphvKi+6Wp24HABioSjuxFARGobyJ5OMXEiGHW6iLR0EmifhPJDddj3CoqtuwEZSkCc73/RAvTeEOvU5w8gz/Zj2Tfo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F5moLI7KwlSIMwABwgbVT21htMNjleheAfPkShEBh/PzQccexdxBT9IPjQAYYZ+3o2OjQ8cQiPb+kVwBCliENXA3sAm6Zj3E/zaq4fD07HmwEmuKYXsUFcDl6Hz7/B1RGfEbPim/bAAAAAElFTkSuQmCC',
}
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)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString("Taxi")
EndTextCommandSetBlipName(blip)
SetBlipSprite (blip, 198)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 1.0)
SetBlipColour (blip, 5)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(_U('blip_taxi'))
EndTextCommandSetBlipName(blip)
end)
-- Display markers
@@ -523,7 +531,7 @@ Citizen.CreateThread(function()
if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then
local coords = GetEntityCoords(GetPlayerPed(-1))
local coords = GetEntityCoords(PlayerPedId())
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
@@ -544,7 +552,7 @@ Citizen.CreateThread(function()
if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then
local coords = GetEntityCoords(GetPlayerPed(-1))
local coords = GetEntityCoords(PlayerPedId())
local isInMarker = false
local currentZone = nil
@@ -578,7 +586,7 @@ Citizen.CreateThread(function()
Citizen.Wait(0)
local playerPed = GetPlayerPed(-1)
local playerPed = PlayerPedId()
if OnJob then
@@ -791,14 +799,16 @@ Citizen.CreateThread(function()
if CurrentAction ~= nil then
SetTextComponentFormat('STRING')
AddTextComponentString(CurrentActionMsg)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
ESX.ShowHelpNotification(CurrentActionMsg)
if IsControlJustReleased(0, Keys['E']) and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then
if CurrentAction == 'taxi_actions_menu' then
OpenTaxiActionsMenu()
elseif CurrentAction == 'cloakroom' then
OpenCloakroom()
elseif CurrentAction == 'vehicle_spawner' then
OpenVehicleSpawnerMenu()
elseif CurrentAction == 'delete_vehicle' then
local playerPed = PlayerPedId()
@@ -806,6 +816,7 @@ Citizen.CreateThread(function()
if Config.EnableSocietyOwnedVehicles then
local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle)
TriggerServerEvent('esx_society:putVehicleInGarage', 'taxi', vehicleProps)
ESX.Game.DeleteVehicle(CurrentActionData.vehicle)
else
if GetEntityModel(CurrentActionData.vehicle) == GetHashKey('taxi') then
ESX.Game.DeleteVehicle(CurrentActionData.vehicle)
+32 -8
View File
@@ -6,26 +6,50 @@ Config.EnablePlayerManagement = false
Config.EnableSocietyOwnedVehicles = false
Config.Locale = 'en'
Config.AuthorizedVehicles = {
{
model = 'taxi',
label = 'Taxi'
}
}
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
VehicleSpawner = {
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
Pos = {x = 911.108, y = -177.867, z = 74.283},
Size = {x = 1.5, y = 1.5, z = 1.0},
Type = -1,
Heading = 225.0
},
VehicleDeleter = {
Pos = {x = 908.317, y = -183.070, z = 73.201},
Size = {x = 3.0, y = 3.0, z = 1.0},
Color = {r = 255, g = 0, b = 0},
Type = 1
},
TaxiActions = {
Pos = {x = 903.32, y = -170.55, z = 73.00},
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
},
Cloakroom = {
Pos = {x = 894.88, y = -180.23, z = 73.50},
Size = {x = 1.5, y = 1.5, z = 1.0},
Color = {r = 204, g = 204, b = 0},
Type = 1
}
}
+14 -4
View File
@@ -1,13 +1,24 @@
Locales['br'] = {
['taking_service'] = 'Pegando serviço: ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'Pressione ~INPUT_CONTEXT~ para guardar o veículo',
['spawn_veh'] = 'pegar veículo',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'Você só pode guardar taxis.',
['taking_service'] = 'Pegando serviço: ',
['full_service'] = 'Serviço completo: ',
['amount_invalid'] = 'Valor inválido',
['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.',
@@ -16,8 +27,6 @@ Locales['br'] = {
['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.',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['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~$%s~s~',
@@ -33,4 +42,5 @@ Locales['br'] = {
['have_withdrawn'] = 'você retirou ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'você depositou ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'você não tem espaço suficiente em seu inventário!',
['blip_taxi'] = 'taxi',
}
+14 -4
View File
@@ -1,13 +1,24 @@
Locales['de'] = {
['taking_service'] = 'Service annehmen: ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'Drücke ~INPUT_CONTEXT~ um das Fahrzeug zu parken',
['spawn_veh'] = 'Fahrzeug spawnen',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'Du kannst nur Taxis parken.',
['taking_service'] = 'Service annehmen: ',
['full_service'] = 'Voller Service: ',
['amount_invalid'] = 'Betrag ungültig',
['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~s~. Suche nach einem anderen.',
@@ -16,8 +27,6 @@ Locales['de'] = {
['take_me_to'] = '~s~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.',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['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~$%s~s~',
@@ -33,4 +42,5 @@ Locales['de'] = {
['have_withdrawn'] = 'you have withdrawn ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'you have deposited ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!',
['blip_taxi'] = 'taxi',
}
+14 -4
View File
@@ -1,13 +1,24 @@
Locales['en'] = {
['taking_service'] = 'taking service: ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'press ~INPUT_CONTEXT~ to store the vehicle',
['spawn_veh'] = 'spawn vehicle',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'you can only store taxis.',
['taking_service'] = 'taking service: ',
['full_service'] = 'full service: ',
['amount_invalid'] = 'amount invalid',
['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~s~. Look for another one.',
@@ -16,8 +27,6 @@ Locales['en'] = {
['take_me_to'] = '~s~Take me to ~y~%s',
['close_to_client'] = 'you are too far from the client, get close to them',
['return_to_veh'] = 'please return to your vehicle to continue the mission',
['only_taxi'] = 'you can only store taxis.',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['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~$%s~s~',
@@ -33,4 +42,5 @@ Locales['en'] = {
['have_withdrawn'] = 'you have withdrawn ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'you have deposited ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!',
['blip_taxi'] = 'taxi',
}
+15 -5
View File
@@ -1,13 +1,24 @@
Locales['fi'] = {
['taking_service'] = 'Aloitetaan työ: ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'paina ~INPUT_CONTEXT~ laittaaksesi auto talliin',
['spawn_veh'] = 'spawnaa ajoneuvo',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'Voit vain tallettaa taxeja',
['taking_service'] = 'Aloitetaan työ: ',
['full_service'] = 'täysi palvelu: ',
['amount_invalid'] = 'virheellinen summa',
['press_to_open'] = 'paina ~INPUT_CONTEXT~ avataksesi valikko',
['billing'] = 'Laskutus',
['invoice_amount'] = 'laskun määrä',
['no_players_near'] = 'ei pelaajia lähellä',
['store_veh'] = 'paina ~INPUT_CONTEXT~ laittaaksesi auto talliin',
['drive_search_pass'] = 'Ajele ympäriinsä etsi uusia ~y~asiakkaita',
['customer_found'] = 'Sinä ~g~löysit~s~ asiakkaan, aja lähemmäksi',
['client_unconcious'] = 'Sinun asiakkaasi on ~r~tajuton~s~. Etsi uusi.',
@@ -16,8 +27,6 @@ Locales['fi'] = {
['take_me_to'] = '~s~Vie minut~y~ %s',
['close_to_client'] = 'Olet asiakkaan lähellä, mene lähemmäksi',
['return_to_veh'] = 'Mene takaisin ajoneuvoon, jatkaaksesi töitä',
['only_taxi'] = 'Voit vain tallettaa taxeja',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['must_in_taxi'] = 'Sinun pitää olla taxissa että voit alottaa työn',
['must_in_vehicle'] = 'Sinun pitää olla ajoneuvossa että voit alottaa työn',
['have_earned'] = 'Sinä tienasit ~g~€%s~s~',
@@ -33,4 +42,5 @@ Locales['fi'] = {
['have_withdrawn'] = 'sinä nostit ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'sinä talletit ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'sinulla ~r~ei ole~s~ enempää ~y~vapaata tilaa~s~ repussasi!',
}
['blip_taxi'] = 'taxi',
}
+15 -5
View File
@@ -1,13 +1,24 @@
Locales['fr'] = {
['taking_service'] = 'prise de service : ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'appuyez sur ~INPUT_CONTEXT~ pour ranger le véhicule',
['spawn_veh'] = 'sortir véhicule',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'vous ne pouvez ranger que les taxi',
['taking_service'] = 'prise de service : ',
['full_service'] = 'service complet : ',
['amount_invalid'] = 'montant invalide',
['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.',
@@ -16,8 +27,6 @@ Locales['fr'] = {
['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',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['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~$%s~s~',
@@ -33,4 +42,5 @@ Locales['fr'] = {
['have_withdrawn'] = 'vous avez pris ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'vous avez déposé ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'vous n\'avez pas assez ~y~de place~s~ dans votre inventaire!',
}
['blip_taxi'] = 'taxi',
}
+15 -5
View File
@@ -1,13 +1,24 @@
Locales['pl'] = {
['taking_service'] = 'przyjmowanie usługi: ',
-- cloakroom
['cloakroom_menu'] = 'cloakroom',
['cloakroom_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~cloakroom~s~.',
['wear_citizen'] = 'citizen wear',
['wear_work'] = 'taxi wear',
-- garage
['spawner_prompt'] = 'press ~INPUT_CONTEXT~ to open the ~y~garage~s~.',
['store_veh'] = 'naciśnij ~INPUT_CONTEXT~ aby zdać pojazd',
['spawn_veh'] = 'sprowadź pojazd',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['only_taxi'] = 'możesz przechowywać tylko taksówki.',
['taking_service'] = 'przyjmowanie usługi: ',
['full_service'] = 'pełny serwis: ',
['amount_invalid'] = 'wartość nieprawidłowa',
['press_to_open'] = 'naciśnij ~INPUT_CONTEXT~ aby wejść do menu',
['billing'] = 'rachunek',
['invoice_amount'] = 'wartość należności',
['no_players_near'] = 'brak graczy w pobliżu',
['store_veh'] = 'naciśnij ~INPUT_CONTEXT~ aby zdać pojazd',
['drive_search_pass'] = 'jazda w poszukiwaniu ~y~pasażerów',
['customer_found'] = '~g~Znalazłeś~s~ klienta, jedź do niego',
['client_unconcious'] = 'twój jest ~r~nieprzytomny xD~s~. Poszukaj innego.',
@@ -16,8 +27,6 @@ Locales['pl'] = {
['take_me_to'] = '~s~Weź mnie do~y~ %s',
['close_to_client'] = 'jesteś blisko klienta, podjedź do niego bliżej',
['return_to_veh'] = 'proszę wróć do swojego pojazdu aby kontynuować misję',
['only_taxi'] = 'możesz przechowywać tylko taksówki.',
['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!',
['must_in_taxi'] = 'musisz być w taksówce aby rozpocząć misję',
['must_in_vehicle'] = 'musisz być w pojeździe aby rozpocząć misję',
['have_earned'] = 'zarobiłeś ~g~$%s~s~',
@@ -33,4 +42,5 @@ Locales['pl'] = {
['have_withdrawn'] = 'wyciągnąłeś/aś ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'zdeponowałeś/aś ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = '~r~Nie~s~ masz wystarczająco ~y~wolnego miejsca~s~ w swoim ekwipunku!',
}
['blip_taxi'] = 'taxi',
}
+13 -4
View File
@@ -1,13 +1,23 @@
Locales['sv'] = {
['taking_service'] = 'du deltog tjänst: ',
-- cloakroom
['cloakroom_menu'] = 'omklädningsrum',
['cloakroom_prompt'] = 'tryck ~INPUT_CONTEXT~ för att öppna ~y~omklädningsrummet~s~.',
['wear_citizen'] = 'civila kläder',
['wear_work'] = 'taxikläder',
-- garage
['spawner_prompt'] = 'tryck ~INPUT_CONTEXT~ för att öppna ~y~garaget~s~.',
['store_veh'] = 'tryck ~INPUT_CONTEXT~ för att ~y~spara~s~ fordonet.',
['spawn_veh'] = 'plocka ut taxi',
['spawnpoint_blocked'] = 'det är ett fordon som blockerar spawnpointen!',
['only_taxi'] = 'du kan endast lagra ~y~taxi fordon~s~ här..',
['taking_service'] = 'du deltog tjänst: ',
['full_service'] = 'du kan inte delta tjänst: ',
['amount_invalid'] = 'ogiltig mängd!',
['press_to_open'] = 'tryck ~INPUT_CONTEXT~ för att öppna menyn.',
['billing'] = 'skapa räkning',
['invoice_amount'] = 'faktureringsbelopp',
['no_players_near'] = 'det finns ingen spelare i närheten!',
['store_veh'] = 'tryck ~INPUT_CONTEXT~ för att ~y~spara~s~ fordonet.',
['drive_search_pass'] = 'åk runt för att hitta ~y~kunder~s~',
['customer_found'] = 'du har ~g~hittat~s~ en kund!',
['client_unconcious'] = 'din kund är ~r~medvetslös~s~. Hitta en ny.',
@@ -16,8 +26,6 @@ Locales['sv'] = {
['take_me_to'] = '~s~Ta mig till ~y~%s~s~',
['close_to_client'] = 'åk närmare din kund!',
['return_to_veh'] = 'vänligen återvänd till ditt fordon och återuppta körningen.',
['only_taxi'] = 'du kan endast lagra ~y~taxi fordon~s~ här..',
['spawnpoint_blocked'] = 'det är ett fordon som blockerar spawnpointen!',
['must_in_taxi'] = 'du måste vara i en ~y~taxi~s~ för att starta uppdraget.',
['must_in_vehicle'] = 'du måste vara i ett ~b~fordon~s~ för att starta uppdraget.',
['have_earned'] = 'du har tjärnat ~g~%s SEK~s~',
@@ -33,4 +41,5 @@ Locales['sv'] = {
['have_withdrawn'] = 'du har tagit ut ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'du har lagrat ~y~x%s~s~ ~b~%s~s~',
['player_cannot_hold'] = 'du har ~r~inte~s~ tillräckligt med ~y~utrymme~s~ för att hålla det!',
['blip_taxi'] = 'taxifirman',
}