mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Possible fix for drag out vehicle, Possible fix #131, locale improvements, see desc
- Moved phone string to locale - The police society can no longer wash money
This commit is contained in:
+7
-10
@@ -1125,6 +1125,7 @@ function OpenGetStocksMenu()
|
||||
'default', GetCurrentResourceName(), 'stocks_menu',
|
||||
{
|
||||
title = _U('police_stock'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
},
|
||||
function(data, menu)
|
||||
@@ -1186,6 +1187,7 @@ function OpenPutStocksMenu()
|
||||
'default', GetCurrentResourceName(), 'stocks_menu',
|
||||
{
|
||||
title = _U('inventory'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
},
|
||||
function(data, menu)
|
||||
@@ -1239,7 +1241,7 @@ RegisterNetEvent('esx_phone:loaded')
|
||||
AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts)
|
||||
|
||||
local specialContact = {
|
||||
name = 'Police',
|
||||
name = _U('phone_police'),
|
||||
number = 'police',
|
||||
base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRw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ZuWYJMzKuSsH+SNwh3bo0p6hao6HeEqwYEZ2M6aKWd3PwTCy7du/D0F1DsmzE6/WGLr5LsDF4LggnYBacCOboQLHQ3FFfR58SR+HCR1iQH8ukhA5s5o5AYZMwUqOp74nl8xvRHDlRTsnxYpJsUjtsceHt2C8Fm0MPJrphTkZvBc4It9RKLOFx91Pf0Igu0k7W2MmkOewS2QYJUJVWVz9VNbXUVVwkyuAmKTFJayrDo/4Jwe/CT0aGYTrWVYEeUfsgXssMRcpyenraQJa0VX9O3ZU+Ma1fax4xGxUsUVFkOUbcama1hf+7+LmA9juHWshwmwOE1iMmCFYEzg1jtIm1BaxW6wCGGoFdewPfvyE4ertTiv4rHC73B855dwp2a23bbd4tC1hvhOCbX7b4VyUQKhxrtSOaYKngasizvwi0RmOS4O1QZf2yYfiaR+73AvhTQEVf+rpn9/8IMAChKDrDzfsdIQAAAABJRU5ErkJggg=='
|
||||
}
|
||||
@@ -1498,20 +1500,15 @@ AddEventHandler('esx_policejob:putInVehicle', function()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_policejob:OutVehicle')
|
||||
AddEventHandler('esx_policejob:OutVehicle', function(targetID)
|
||||
AddEventHandler('esx_policejob:OutVehicle', function()
|
||||
local playerPed = PlayerPedId()
|
||||
local targetPed = GetPlayerPed(targetID)
|
||||
|
||||
if not IsPedSittingInAnyVehicle(playerPed) then
|
||||
return
|
||||
end
|
||||
|
||||
ClearPedTasksImmediately(targetPed)
|
||||
targetPos = GetEntityCoords(playerPed, true)
|
||||
|
||||
local newX = plyPos.x+2
|
||||
local newY = plyPos.y+2
|
||||
SetEntityCoords(playerPed, newX, newY, targetPos.z)
|
||||
local vehicle = GetVehiclePedIsIn(playerPed, false)
|
||||
TaskLeaveVehicle(playerPed, vehicle, 16)
|
||||
end)
|
||||
|
||||
-- Handcuff
|
||||
@@ -1856,7 +1853,7 @@ Citizen.CreateThread(function()
|
||||
CurrentAction = 'menu_boss_actions'
|
||||
CurrentActionMsg = _U('open_bossmenu')
|
||||
CurrentActionData = {}
|
||||
end)
|
||||
end, { wash = false }) -- disable washing money
|
||||
elseif CurrentAction == 'remove_entity' then
|
||||
DeleteEntity(CurrentActionData.entity)
|
||||
end
|
||||
|
||||
+8
-1
@@ -4,7 +4,7 @@ Locales['br'] = {
|
||||
['citizen_wear'] = 'Roupa casual',
|
||||
['police_wear'] = 'Uniforme da Polícia',
|
||||
['sheriff_wear'] = 'sheriff Outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit ',
|
||||
['lieutenant_wear'] = 'Swatt outfit',
|
||||
['gilet_wear'] = 'orange reflective jacket',
|
||||
['bullet_wear'] = 'bulletproof vest',
|
||||
['no_outfit'] = 'there\'s no uniform that fits you!',
|
||||
@@ -109,10 +109,17 @@ Locales['br'] = {
|
||||
['invalid_amount'] = 'Quantidade inválida',
|
||||
['amount_of_deposit'] = 'Quantidade de depósito',
|
||||
['open_bossmenu'] = 'Pressione ~INPUT_CONTEXT~ para abrir o menu',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'quantity',
|
||||
['inventory'] = 'inventory',
|
||||
['police_stock'] = 'police Stock',
|
||||
-- Misc
|
||||
['remove_prop'] = 'Pressione ~INPUT_CONTEXT~ para remover o objeto',
|
||||
['map_blip'] = 'Departamento de Polícia',
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Alerta da Polícia',
|
||||
['phone_police'] = 'police',
|
||||
}
|
||||
|
||||
@@ -109,10 +109,17 @@ Locales['de'] = {
|
||||
['invalid_amount'] = 'ungültiger Betrag',
|
||||
['amount_of_deposit'] = 'Betrag zum einzahlen',
|
||||
['open_bossmenu'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'quantity',
|
||||
['inventory'] = 'inventory',
|
||||
['police_stock'] = 'police Stock',
|
||||
-- Misc
|
||||
['remove_prop'] = 'Drücke ~INPUT_CONTEXT~ um das Objekt zu entfernen',
|
||||
['map_blip'] = 'Polizeistation',
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Polizei alamieren',
|
||||
['phone_police'] = 'police',
|
||||
}
|
||||
|
||||
+4
-5
@@ -110,17 +110,16 @@ Locales['en'] = {
|
||||
['amount_of_deposit'] = 'amount of deposit',
|
||||
['open_bossmenu'] = 'press ~INPUT_CONTEXT~ to open the menu',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdrawn'] = 'you have withdrawn x',
|
||||
['not_enough_in_society'] = 'there\'s not enough of ~r~that item~s~ in the society!',
|
||||
['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!',
|
||||
['added'] = 'you added x',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'quantity',
|
||||
['inventory'] = 'inventory',
|
||||
['police_stock'] = 'Police Stock',
|
||||
['police_stock'] = 'police Stock',
|
||||
-- Misc
|
||||
['remove_prop'] = 'press ~INPUT_CONTEXT~ to delete the object',
|
||||
['map_blip'] = 'police Station',
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'alert police',
|
||||
['phone_police'] = 'police',
|
||||
}
|
||||
|
||||
+15
-14
@@ -103,22 +103,23 @@ Locales['es'] = {
|
||||
['buy_weapon_menu'] = 'Arsenal - Comprar armas',
|
||||
['not_enough_money'] = 'No tienes suficiente dinero',
|
||||
-- Boss Menu
|
||||
['take_company_money'] = 'Retirar dinero de la empresa',
|
||||
['deposit_money'] = 'Depositar dinero en la empresa',
|
||||
['amount_of_withdrawal'] = 'Cantidad a retirar',
|
||||
['invalid_amount'] = 'Cantidad inválida',
|
||||
['amount_of_deposit'] = 'Cantidad a depositar',
|
||||
['open_bossmenu'] = 'Presionar ~INPUT_CONTEXT~ para abrir el menú',
|
||||
['quantity_invalid'] = 'Cantidad invalida',
|
||||
['have_withdrawn'] = 'Has retirado x',
|
||||
['added'] = 'Has metido x',
|
||||
['quantity'] = 'Cantidad',
|
||||
['take_company_money'] = 'retirar dinero de la empresa',
|
||||
['deposit_money'] = 'depositar dinero en la empresa',
|
||||
['amount_of_withdrawal'] = 'cantidad a retirar',
|
||||
['invalid_amount'] = 'cantidad inválida',
|
||||
['amount_of_deposit'] = 'cantidad a depositar',
|
||||
['open_bossmenu'] = 'presionar ~INPUT_CONTEXT~ para abrir el menú',
|
||||
['quantity_invalid'] = 'cantidad invalida',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'cantidad',
|
||||
['inventory'] = 'inventario',
|
||||
['police_stock'] = 'Almacen Policial',
|
||||
['police_stock'] = 'almacen Policial',
|
||||
-- Misc
|
||||
['remove_prop'] = 'Presionar ~INPUT_CONTEXT~ para eliminar el objeto',
|
||||
['map_blip'] = 'Comisaría de policía',
|
||||
['remove_prop'] = 'presionar ~INPUT_CONTEXT~ para eliminar el objeto',
|
||||
['map_blip'] = 'comisaría de policía',
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Alerta policia',
|
||||
['alert_police'] = 'alerta policia',
|
||||
['phone_police'] = 'policia',
|
||||
}
|
||||
|
||||
+3
-2
@@ -110,8 +110,8 @@ Locales['fi'] = {
|
||||
['amount_of_deposit'] = 'talletuksen määrä',
|
||||
['open_bossmenu'] = 'paina ~INPUT_CONTEXT~ avataksesi valikon',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdrawn'] = 'sinä nostit x',
|
||||
['added'] = 'sinä lisäsit varastoon x',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'määrä',
|
||||
['inventory'] = 'varasto',
|
||||
['police_stock'] = 'Poliisin Varasto',
|
||||
@@ -121,4 +121,5 @@ Locales['fi'] = {
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'hälyytys Poliisi',
|
||||
['phone_police'] = 'poliisi',
|
||||
}
|
||||
+6
-5
@@ -109,16 +109,17 @@ Locales['fr'] = {
|
||||
['invalid_amount'] = 'montant invalide',
|
||||
['amount_of_deposit'] = 'montant du dépôt',
|
||||
['open_bossmenu'] = 'appuyez sur ~INPUT_CONTEXT~ pour ouvrir le menu',
|
||||
['quantity_invalid'] = 'Quantité invalide',
|
||||
['have_withdrawn'] = 'Vous avez retiré x',
|
||||
['added'] = 'Vous avez ajouté x',
|
||||
['quantity'] = 'Quantité',
|
||||
['quantity_invalid'] = 'quantité invalide',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'quantité',
|
||||
['inventory'] = 'inventaire',
|
||||
['police_stock'] = 'Police Stock',
|
||||
['police_stock'] = 'police Stock',
|
||||
-- Misc
|
||||
['remove_prop'] = 'appuyez sur ~INPUT_CONTEXT~ pour enlever l\'objet',
|
||||
['map_blip'] = 'Commissariat',
|
||||
['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'alerte police',
|
||||
['phone_police'] = 'police',
|
||||
}
|
||||
|
||||
+3
-4
@@ -111,10 +111,8 @@ Locales['pl'] = {
|
||||
['amount_of_deposit'] = 'wartość depozytu',
|
||||
['open_bossmenu'] = 'naciśnij ~INPUT_CONTEXT~ aby otworzyć menu',
|
||||
['quantity_invalid'] = 'nieprawidłowa ilość',
|
||||
['have_withdrawn'] = 'wypłaciłeś x',
|
||||
['not_enough_in_society'] = 'niewystarczająca ilość przedmiotu w społeczeństwie!',
|
||||
['player_cannot_hold'] = '~r~Nie masz~w~ wystarczająco ~y~wolnego miejsca~w~ w ekwipunku!',
|
||||
['added'] = 'dodałeś x',
|
||||
['have_withdrawn'] = 'you have withdrawn ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'you have deposited ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'ilość',
|
||||
['inventory'] = 'ekwipunek',
|
||||
['police_stock'] = 'zapasy policji',
|
||||
@@ -124,4 +122,5 @@ Locales['pl'] = {
|
||||
['unrestrained_timer'] = 'czujesz, że twoje kajdanki powoli tracą przyczepność i znikają.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'ostrzeż policję',
|
||||
['phone_police'] = 'police',
|
||||
}
|
||||
|
||||
+3
-2
@@ -109,8 +109,8 @@ Locales['sv'] = {
|
||||
['amount_of_deposit'] = 'belopp att lägga in',
|
||||
['open_bossmenu'] = 'tryck ~INPUT_CONTEXT~ för att öppna menyn',
|
||||
['quantity_invalid'] = 'otillgängligt antal',
|
||||
['have_withdraw'] = 'Du har tagit ut x',
|
||||
['added'] = 'Du la in x',
|
||||
['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~',
|
||||
['quantity'] = 'Antal',
|
||||
['inventory'] = 'Förråd',
|
||||
['police_stock'] = 'Polisförråd',
|
||||
@@ -120,4 +120,5 @@ Locales['sv'] = {
|
||||
['unrestrained_timer'] = 'dina handklovar har försvunnit',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Meddela polisen',
|
||||
['phone_police'] = 'polisen',
|
||||
}
|
||||
|
||||
+21
-15
@@ -81,23 +81,29 @@ end)
|
||||
|
||||
RegisterServerEvent('esx_policejob:getStockItem')
|
||||
AddEventHandler('esx_policejob:getStockItem', function(itemName, count)
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
local sourceItem = xPlayer.getInventoryItem(itemName)
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory)
|
||||
|
||||
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', 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
|
||||
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn') .. count .. ' ' .. item.label)
|
||||
|
||||
end)
|
||||
-- is there enough in the society?
|
||||
if count > 0 and item.count >= count then
|
||||
|
||||
-- can the player carry the said amount of x item?
|
||||
if sourceItem.limit ~= -1 and (sourceItem.count + count) > sourceItem.limit then
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
|
||||
else
|
||||
inventory.removeItem(itemName, count)
|
||||
xPlayer.addInventoryItem(itemName, count)
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('have_withdrawn', count, item.label))
|
||||
end
|
||||
else
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('quantity_invalid'))
|
||||
end
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
@@ -117,7 +123,7 @@ AddEventHandler('esx_policejob:putStockItems', function(itemName, count)
|
||||
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('have_deposited', count, item.label))
|
||||
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user