diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql index 6db07072..f0697065 100644 --- a/[SQL]/legacy.sql +++ b/[SQL]/legacy.sql @@ -329,7 +329,8 @@ INSERT INTO `licenses` (`type`, `label`) VALUES ('drive', 'Drivers License'), ('drive_bike', 'Motorcycle License'), ('drive_truck', 'Commercial Drivers License'), -('weed_processing', 'Weed Processing License'); +('weed_processing', 'Weed Processing License'), +('boat', 'Boat License'); -- -------------------------------------------------------- @@ -709,12 +710,13 @@ INSERT INTO `vehicle_categories` (`name`, `label`) VALUES -- CREATE TABLE `vehicle_sold` ( - `id` INT(11) NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, `client` varchar(50) NOT NULL, `model` varchar(50) NOT NULL, `plate` varchar(50) NOT NULL, `soldby` varchar(50) NOT NULL, - `date` varchar(50) NOT NULL + `date` varchar(50) NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB; -- @@ -846,24 +848,12 @@ ALTER TABLE `user_licenses` ALTER TABLE `vehicle_categories` ADD PRIMARY KEY (`name`); --- --- Indexes for table `vehicle_sold` --- -ALTER TABLE `vehicle_sold` - ADD PRIMARY KEY (`id`); - -- -- Indexes for table `whitelist` -- ALTER TABLE `whitelist` ADD PRIMARY KEY (`identifier`); --- --- Indexes for table `vehicle_sold` --- -ALTER TABLE `vehicle_sold` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - -- -- AUTO_INCREMENT for table `addon_account_data` -- diff --git a/[esx]/es_extended/server/main.lua b/[esx]/es_extended/server/main.lua index 52a6f6f7..8b4c00d3 100644 --- a/[esx]/es_extended/server/main.lua +++ b/[esx]/es_extended/server/main.lua @@ -99,14 +99,14 @@ if not Config.Multichar then if identifier then if ESX.GetPlayerFromIdentifier(identifier) then deferrals.done( - ('There was an error loading your character!\nError code: identifier-active\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same account.\n\nYour identifier: %s'):format( + ('[ESX] There was an error loading your character!\nError code: identifier-active\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same account.\n\nYour identifier: %s'):format( identifier)) else deferrals.done() end else deferrals.done( - 'There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.') + '[ESX] There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.') end end) end @@ -133,9 +133,9 @@ function loadESXPlayer(identifier, playerId, isNew) end local index = #userData.accounts + 1 userData.accounts[index] = { - name = account, + name = account, money = foundAccounts[account] or Config.StartingAccountMoney[account] or 0, - label = data.label, + label = data.label, round = data.round, index = index } @@ -299,13 +299,13 @@ function loadESXPlayer(identifier, playerId, isNew) xPlayer.triggerEvent('esx:playerLoaded', { - accounts = xPlayer.getAccounts(), - coords = xPlayer.getCoords(), - identifier = xPlayer.getIdentifier(), + accounts = xPlayer.getAccounts(), + coords = xPlayer.getCoords(), + identifier = xPlayer.getIdentifier(), inventory = xPlayer.getInventory(), - job = xPlayer.getJob(), - loadout = xPlayer.getLoadout(), - maxWeight = xPlayer.getMaxWeight(), + job = xPlayer.getJob(), + loadout = xPlayer.getLoadout(), + maxWeight = xPlayer.getMaxWeight(), money = xPlayer.getMoney(), sex = xPlayer.get("sex") or "m", firstName = xPlayer.get("firstName") or "John", diff --git a/[esx]/esx_loadingscreen/css/index.css b/[esx]/esx_loadingscreen/css/index.css index 9520df8e..6cb39671 100644 --- a/[esx]/esx_loadingscreen/css/index.css +++ b/[esx]/esx_loadingscreen/css/index.css @@ -12,102 +12,106 @@ * This copyright should appear in every part of the project code */ -html,body { - - margin: 0; - padding: 0; - font-family: 'Quicksand', sans-serif; - overflow: hidden; - +html, +body { + margin: 0; + padding: 0; + font-family: "Quicksand", sans-serif; + overflow: hidden; } #esx_intro { - - z-index: 2; - + z-index: 2; } #esx_loop { - - z-index: 1; - + z-index: 1; } #loading_txt { + bottom: 5%; + left: 50%; + margin-left: -80px; + position: absolute; + z-index: 999; - bottom: 5%; - left: 50%; - margin-left: -80px; - position: absolute; - z-index: 999; - - -webkit-animation: fadein 5s; - -moz-animation: fadein 5s; - -ms-animation: fadein 5s; - -o-animation: fadein 5s; - animation: fadein 5s; - + -webkit-animation: fadein 5s; + -moz-animation: fadein 5s; + -ms-animation: fadein 5s; + -o-animation: fadein 5s; + animation: fadein 5s; } p { - - color: white; - font-size: 32px; - + color: white; + font-size: 32px; } .text_thing:after { - content: ' .'; - animation: dots 2s steps(5, end) infinite; + content: " ."; + animation: dots 2s steps(5, end) infinite; } @keyframes dots { - 0%, 20% { - color: rgba(0,0,0,0); - text-shadow: - .25em 0 0 rgba(0,0,0,0), - .5em 0 0 rgba(0,0,0,0); - } - 40% { - color: white; - text-shadow: - .25em 0 0 rgba(0,0,0,0), - .5em 0 0 rgba(0,0,0,0); - } - 60% { - text-shadow: - .25em 0 0 white, - .5em 0 0 rgba(0,0,0,0); - } - 80%, 100% { - text-shadow: - .25em 0 0 white, - .5em 0 0 white; - } + 0%, + 20% { + color: rgba(0, 0, 0, 0); + text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0); + } + 40% { + color: white; + text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0); + } + 60% { + text-shadow: 0.25em 0 0 white, 0.5em 0 0 rgba(0, 0, 0, 0); + } + 80%, + 100% { + text-shadow: 0.25em 0 0 white, 0.5em 0 0 white; + } } - @keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } + from { + opacity: 0; + } + to { + opacity: 1; + } } @-moz-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } + from { + opacity: 0; + } + to { + opacity: 1; + } } @-webkit-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } + from { + opacity: 0; + } + to { + opacity: 1; + } } @-ms-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } + from { + opacity: 0; + } + to { + opacity: 1; + } } @-o-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } + from { + opacity: 0; + } + to { + opacity: 1; + } } diff --git a/[esx]/esx_loadingscreen/index.html b/[esx]/esx_loadingscreen/index.html index ced82440..212b9e7e 100644 --- a/[esx]/esx_loadingscreen/index.html +++ b/[esx]/esx_loadingscreen/index.html @@ -1,28 +1,25 @@ - - - + - - + - - - + +
-
-

Loading

-
+
+

Loading

+
- - + +
- - - - \ No newline at end of file + + diff --git a/[esx]/esx_loadingscreen/js/index.js b/[esx]/esx_loadingscreen/js/index.js index 955be242..e2312b4a 100644 --- a/[esx]/esx_loadingscreen/js/index.js +++ b/[esx]/esx_loadingscreen/js/index.js @@ -10,13 +10,13 @@ // If you redistribute this software, you must link to ORIGINAL repository at https://github.com/esx-framework/esx-reborn // This copyright should appear in every part of the project code -$(document).ready(function(){ - const introTag = document.getElementById('esx_intro'); - const loopTag = document.getElementById('esx_loop'); +document.addEventListener("DOMContentLoaded", () => { + const introTag = document.getElementById("esx_intro"); + const loopTag = document.getElementById("esx_loop"); - introTag.onended = (event) => { - introTag.style.display = "none"; - loopTag.loop = true; // true - loopTag.play() - }; -}) + introTag.onended = () => { + introTag.style.display = "none"; + loopTag.loop = true; // true + loopTag.play(); + }; +}); diff --git a/[esx]/esx_multicharacter/client/main.lua b/[esx]/esx_multicharacter/client/main.lua index c37bf0f7..de34e7c3 100644 --- a/[esx]/esx_multicharacter/client/main.lua +++ b/[esx]/esx_multicharacter/client/main.lua @@ -140,6 +140,24 @@ if ESX.GetConfig().Multichar then }) end + function CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, value) + local elements = { + {title = TranslateCap('char_delete_confirmation'), icon = "fa-solid fa-users", description = TranslateCap('char_delete_confirmation_description'), unselectable = true}, + {title = TranslateCap('char_delete'), icon ="fa-solid fa-xmark", description = TranslateCap('char_delete_yes_description'), action = 'delete', value = value}, + {title = TranslateCap('return'), unselectable = false, icon = "fa-solid fa-arrow-left", description = TranslateCap('char_delete_no_description'), action = "return"} + } + + ESX.OpenContext("left", elements, function(element, Action) + if Action.action == "delete" then + ESX.CloseContext() + TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value) + spawned = false + elseif Action.action == "return" then + CharacterOptions(Characters, slots, SelectedCharacter) + end + end, nil, false) + end + function CharacterOptions(Characters, slots, SelectedCharacter) local elements = {{title = TranslateCap('character', Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname),icon = "fa-regular fa-user", unselectable = true}, {title = TranslateCap('return'), unselectable = false,icon = "fa-solid fa-arrow-left",description = TranslateCap('return_description'), action = "return"}} @@ -157,9 +175,7 @@ if ESX.GetConfig().Multichar then ESX.CloseContext() TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false) elseif Action.action == "delete" then - ESX.CloseContext() - TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value) - spawned = false + CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, Action.value) elseif Action.action == "return" then SelectCharacterMenu(Characters, slots) end diff --git a/[esx]/esx_multicharacter/locales/en.lua b/[esx]/esx_multicharacter/locales/en.lua index 64491ee2..d796ec32 100644 --- a/[esx]/esx_multicharacter/locales/en.lua +++ b/[esx]/esx_multicharacter/locales/en.lua @@ -10,6 +10,10 @@ Locales["en"] = { ["char_disabled_description"] = "This Character Is Unusable.", ["char_delete"] = "Delete", ["char_delete_description"] = "Permanently Remove This Character.", + ["char_delete_confirmation"] = "Delete Confirmation", + ["char_delete_confirmation_description"] = "Are you sure removing selected character?", + ["char_delete_yes_description"] = "Yes, I am sure removing selected character", + ["char_delete_no_description"] = "No, return to character options", ["character"] = "Character: %s", ["return"] = "Return", ["return_description"] = "Return To Character Selection.", diff --git a/[esx_addons]/esx_allowlist/server/main.lua b/[esx_addons]/esx_allowlist/server/main.lua index 89d96428..8a2bf799 100644 --- a/[esx_addons]/esx_allowlist/server/main.lua +++ b/[esx_addons]/esx_allowlist/server/main.lua @@ -29,11 +29,11 @@ AddEventHandler('playerConnecting', function(name, setCallback, deferrals) local identifier = ESX.GetIdentifier(playerId) if ESX.Table.SizeOf(AllowList) == 0 then - kickReason = TranslateCap('allowlist_empty') + kickReason = "[ESX] " .. TranslateCap('allowlist_empty') elseif not identifier then - kickReason = TranslateCap('license_missing') + kickReason = "[ESX] " .. TranslateCap('license_missing') elseif not AllowList[identifier] then - kickReason = TranslateCap('not_allowlist') + kickReason = "[ESX] " .. TranslateCap('not_allowlist') end if kickReason then diff --git a/[esx_addons]/esx_banking/client/main.lua b/[esx_addons]/esx_banking/client/main.lua index 4d7ee66d..bcaeb811 100644 --- a/[esx_addons]/esx_banking/client/main.lua +++ b/[esx_addons]/esx_banking/client/main.lua @@ -199,7 +199,7 @@ end) local function loadNPC(index, netID) CreateThread(function() while not NetworkDoesEntityExistWithNetworkId(netID) do - Wait(1) + Wait(200) end local npc = NetworkGetEntityFromNetworkId(netID) diff --git a/[esx_addons]/esx_banking/html/config.json b/[esx_addons]/esx_banking/html/config.json index af9490cc..565c4c9b 100644 --- a/[esx_addons]/esx_banking/html/config.json +++ b/[esx_addons]/esx_banking/html/config.json @@ -292,5 +292,102 @@ "tableFullLanguage":"Italian" } } + }, +"ES":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Cerrar", + "bankTitle":"Banco Fleeca", + "mainExitButtonText": "Cerrar sesión" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"Aprobar", + "inputPlaceholder": "Introduzca 4 dígitos...", + "title":"CONFIGURACIÓN DEL PIN", + "description": "Aquí puede establecer o cambiar el código PIN.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"Aprobar", + "inputPlaceholder": "Importe", + "title":"RETIRAR", + "description": "Aquí puede retirar su dinero del banco.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"Aprobación", + "inputPlaceholder": "Importe", + "title":"DEPOSITO", + "description": "Aquí puede ingresar su dinero en el banco.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"Transfererir", + "inputPlaceholder": "Importe", + "inputPlaceholder2": "ID del jugador", + "title":"TRANSFERENCIA", + "description": "Aquí puedes transferir tu dinero a otra persona." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"HISTORIAL DE TRANSACCIONES", + "description": "Aquí puede ver su historial de transacciones.", + "moreHistoryText": "Mostrar más historial", + "moreGraphText": "Mostrar el gráfico" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Introducir PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Close" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Banco Fleeca", + "closeButtonText":"Cerrar sesión" + } + ], + "LAUNGAGE": { + "your_money_title":"Saldo", + "your_money_desc":"Aquí puedes ver tu saldo actual y tu efectivo.", + "your_money_cash_label":"Su dinero en mano", + "your_money_bank_label":"Su saldo bancario", + "withdraw":"RETIRAR", + "deposit":"DEPÓSITO", + "transfer":"TRANSFERENCIA", + "transferReceive":"TRANSFERENCIA RECIBIDA", + "moneyFormat":"$__replaceData__", + "graphTitle":"Su saldo", + "moreGraphTitle": "Gráfico grande", + "moreHistoryTitle":"Mostrar más historial", + "inputErrorTitle":"Data is incorrect", + "inputErrorMessage":"No puede estar vacío ni tener un valor inferior a 1.", + "showPincodeErrorTitle":"PIN incorrecto", + "showPincodeErrorMessage":"El pin debe tener al menos 4 caracteres.", + "tableLang":{ + "typeLabel": "Tipo de transacción", + "balanceLabel":"Saldo", + "amountLabel":"Importe", + "timeLabel":"Tiempo", + "searchInputPlaceholder":"Buscar...", + "_comment": "tableFullLanguage options: English,Hungarian you can find here all lang: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"Spanish" + } + } } } diff --git a/[esx_addons]/esx_basicneeds/client/main.lua b/[esx_addons]/esx_basicneeds/client/main.lua index f6c79364..83eea163 100644 --- a/[esx_addons]/esx_basicneeds/client/main.lua +++ b/[esx_addons]/esx_basicneeds/client/main.lua @@ -108,6 +108,7 @@ end) RegisterNetEvent('esx_basicneeds:onEat') AddEventHandler('esx_basicneeds:onEat', function(prop_name) local Invoke = GetInvokingResource() + print(('[^3WARNING^7] ^5%s^7 used ^5esx_basicneeds:onEat^7, this method is deprecated and should not be used! Refer to ^5https://documentation.esx-framework.org/addons/esx_basicneeds/events/oneat^7 for more info!'):format(Invoke)) if not prop_name then @@ -119,8 +120,10 @@ end) RegisterNetEvent('esx_basicneeds:onDrink') AddEventHandler('esx_basicneeds:onDrink', function(prop_name) local Invoke = GetInvokingResource() + print(('[^3WARNING^7] ^5%s^7 used ^5esx_basicneeds:onDrink^7, this method is deprecated and should not be used! Refer to ^5https://documentation.esx-framework.org/addons/esx_basicneeds/events/ondrink^7 for more info!'):format(Invoke)) + if not prop_name then prop_name = 'prop_ld_flow_bottle' end diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index b5273d1b..feeff260 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -2,9 +2,7 @@ local Vehicles, myCar = {}, {} local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false RegisterNetEvent('esx:playerLoaded') -AddEventHandler('esx:playerLoaded', function(xPlayer) - ESX.PlayerLoaded = true - ESX.PlayerData = xPlayer +AddEventHandler('esx:playerLoaded', function() ESX.TriggerServerCallback('esx_lscustom:getVehiclesPrices', function(vehicles) Vehicles = vehicles end) @@ -13,8 +11,9 @@ end) RegisterNetEvent('esx_lscustom:installMod') AddEventHandler('esx_lscustom:installMod', function() local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + local NetId = NetworkGetNetworkIdFromEntity(vehicle) myCar = ESX.Game.GetVehicleProperties(vehicle) - TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar) + TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetId) end) RegisterNetEvent('esx_lscustom:restoreMods', function(netId, props) @@ -79,8 +78,8 @@ function OpenLSMenu(elems, menuName, menuTitle, parent) if data.current.label == TranslateCap('by_default') or string.match(data.current.label, TranslateCap('installed')) then ESX.ShowNotification(TranslateCap('already_own', data.current.label)) - myCar = ESX.Game.GetVehicleProperties(vehicle) - TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar) + myCar = ESX.Game.GetVehicleProperties(vehicle) + TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetworkGetNetworkIdFromEntity(vehicle)) else local vehiclePrice = 50000 diff --git a/[esx_addons]/esx_lscustom/config.lua b/[esx_addons]/esx_lscustom/config.lua index ecd59c84..b8477198 100644 --- a/[esx_addons]/esx_lscustom/config.lua +++ b/[esx_addons]/esx_lscustom/config.lua @@ -495,7 +495,7 @@ Config.Menus = { label = TranslateCap('transmission'), parent = 'upgrades', modType = 13, - price = {13.95, 20.93, 46.51} + price = {13.95, 20.93, 46.51, 63.55} }, modSuspension = { label = TranslateCap('suspension'), diff --git a/[esx_addons]/esx_lscustom/server/main.lua b/[esx_addons]/esx_lscustom/server/main.lua index 5879b7dc..7ab91939 100644 --- a/[esx_addons]/esx_lscustom/server/main.lua +++ b/[esx_addons]/esx_lscustom/server/main.lua @@ -4,10 +4,10 @@ local Customs = {} RegisterNetEvent('esx_lscustom:startModing', function(props, netId) local src = tostring(source) if Customs[src] then - Customs[src][props.plate] = {props = props, netId = netId} + Customs[src][tostring(props.plate)] = {props = props, netId = netId} else Customs[src] = {} - Customs[src][props.plate] = {props = props, netId = netId} + Customs[src][tostring(props.plate)] = {props = props, netId = netId} end end) @@ -70,16 +70,30 @@ AddEventHandler('esx_lscustom:buyMod', function(price) end) RegisterServerEvent('esx_lscustom:refreshOwnedVehicle') -AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps) +AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps, netId) + local src = tostring(source) local xPlayer = ESX.GetPlayerFromId(source) - MySQL.single('SELECT vehicle FROM owned_vehicles WHERE plate = ?', {vehicleProps.plate}, function(result) if result then local vehicle = json.decode(result.vehicle) if vehicleProps.model == vehicle.model then MySQL.update('UPDATE owned_vehicles SET vehicle = ? WHERE plate = ?', {json.encode(vehicleProps), vehicleProps.plate}) - Customs[tostring(source)][tostring(vehicleProps.plate)].props = vehicleProps + if Customs[src] then + if Customs[src][tostring(vehicleProps.plate)] then + Customs[src][tostring(vehicleProps.plate)].props = vehicleProps + else + Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId} + end + else + Customs[src] = {} + Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId} + end + local veh = NetworkGetEntityFromNetworkId(netId) + local Veh_State = Entity(veh).state.VehicleProperties + if Veh_State then + Entity(veh).state:set("VehicleProperties", vehicleProps, true) + end else print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source)) end diff --git a/esx_example/client/main.lua b/esx_example/client/main.lua index fe995759..696a6fa8 100644 --- a/esx_example/client/main.lua +++ b/esx_example/client/main.lua @@ -1,6 +1,6 @@ RegisterNetEvent('esx:playerLoaded') -- Store the players data AddEventHandler('esx:playerLoaded', function(xPlayer, isNew) - print("Player Loaded. New | " .. isNew) + print(('Player Loaded. New | %s'):format(isNew)) ESX.PlayerData = xPlayer ESX.PlayerLoaded = true end) @@ -23,7 +23,7 @@ end) function OnPlayerData(key, val, last) if type(val) == 'table' then val = json.encode(val) end - print('PlayerData.'..key..' was set to '..val) + print(('PlayerData.%s was set to %s'):format(key, val)) if key == 'job' then if last.name ~= val.name then print('You are now in a different job')