diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql index ff923035..14698851 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'); -- -------------------------------------------------------- diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua index 5de45448..a10df217 100644 --- a/[esx]/es_extended/client/main.lua +++ b/[esx]/es_extended/client/main.lua @@ -1,5 +1,5 @@ local pickups = {} -local PlayerBank, PlayerMoney = 0,0 + CreateThread(function() while not Config.Multichar do Wait(0) @@ -52,71 +52,71 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin) while ESX.PlayerData.ped == nil do Wait(20) end - -- enable PVP if Config.EnablePVP then SetCanAttackFriendly(ESX.PlayerData.ped, true, false) NetworkSetFriendlyFireOption(true) end - CreateThread(function() - local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier - local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame - local DisableControlAction = DisableControlAction - local IsPedArmed = IsPedArmed - local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride - local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards - local RemoveAllPickupsOfType = RemoveAllPickupsOfType - local HideHudComponentThisFrame = HideHudComponentThisFrame - local PlayerId = PlayerId() - local DisabledComps = {} - for i=1, #(Config.RemoveHudCommonents) do - if Config.RemoveHudCommonents[i] then - DisabledComps[#DisabledComps + 1] = i - end - end - while true do - local Sleep = true + CreateThread(function() + local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier + local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame + local DisableControlAction = DisableControlAction + local IsPedArmed = IsPedArmed + local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride + local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards + local RemoveAllPickupsOfType = RemoveAllPickupsOfType + local HideHudComponentThisFrame = HideHudComponentThisFrame + local PlayerId = PlayerId() + local DisabledComps = {} + for i=1, #(Config.RemoveHudCommonents) do + if Config.RemoveHudCommonents[i] then + DisabledComps[#DisabledComps + 1] = i + end + end - if Config.DisableHealthRegeneration then - Sleep = false - SetPlayerHealthRechargeMultiplier(PlayerId, 0.0) - end + while true do + local Sleep = true - if Config.DisableWeaponWheel then - Sleep = false - BlockWeaponWheelThisFrame() - DisableControlAction(0, 37,true) - end + if Config.DisableHealthRegeneration then + Sleep = false + SetPlayerHealthRechargeMultiplier(PlayerId, 0.0) + end - if Config.DisableAimAssist then - Sleep = false - if IsPedArmed(ESX.PlayerData.ped, 4) then - SetPlayerLockonRangeOverride(PlayerId, 2.0) - end - end + if Config.DisableWeaponWheel then + Sleep = false + BlockWeaponWheelThisFrame() + DisableControlAction(0, 37,true) + end - if Config.DisableVehicleRewards then - Sleep = false - DisablePlayerVehicleRewards(PlayerId) + if Config.DisableAimAssist then + Sleep = false + if IsPedArmed(ESX.PlayerData.ped, 4) then + SetPlayerLockonRangeOverride(PlayerId, 2.0) end + end + + if Config.DisableVehicleRewards then + Sleep = false + DisablePlayerVehicleRewards(PlayerId) + end - if Config.DisableNPCDrops then - Sleep = false - RemoveAllPickupsOfType(0xDF711959) -- carbine rifle - RemoveAllPickupsOfType(0xF9AFB48F) -- pistol - RemoveAllPickupsOfType(0xA9355DCD) -- pumpshotgun - end + if Config.DisableNPCDrops then + Sleep = false + RemoveAllPickupsOfType(0xDF711959) + RemoveAllPickupsOfType(0xF9AFB48F) + RemoveAllPickupsOfType(0xA9355DCD) + end - if #DisabledComps > 0 then - Sleep = false - for i=1, #(DisabledComps) do - HideHudComponentThisFrame(DisabledComps[i]) - end + if #DisabledComps > 0 then + Sleep = false + for i=1, #(DisabledComps) do + HideHudComponentThisFrame(DisabledComps[i]) end + end Wait(Sleep and 1500 or 0) - end - end) + end + end) if Config.EnableHud then for i=1, #(ESX.PlayerData.accounts) do diff --git a/[esx]/es_extended/server/main.lua b/[esx]/es_extended/server/main.lua index 00c871ba..52a6f6f7 100644 --- a/[esx]/es_extended/server/main.lua +++ b/[esx]/es_extended/server/main.lua @@ -308,6 +308,10 @@ function loadESXPlayer(identifier, playerId, isNew) maxWeight = xPlayer.getMaxWeight(), money = xPlayer.getMoney(), sex = xPlayer.get("sex") or "m", + firstName = xPlayer.get("firstName") or "John", + lastName = xPlayer.get("lastName") or "Doe", + dateofbirth = xPlayer.get("dateofbirth") or "01/01/2000", + height = xPlayer.get("height") or 120, dead = false }, isNew, userData.skin) diff --git a/[esx]/esx_context/main.lua b/[esx]/esx_context/main.lua index 8a2769c9..6c16fc7d 100644 --- a/[esx]/esx_context/main.lua +++ b/[esx]/esx_context/main.lua @@ -13,6 +13,7 @@ function Post(fn,...) end function Open(position,eles,onSelect,onClose,canClose) + local canClose = canClose == nil and true or canClose activeMenu = { position = position, eles = eles, 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_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index 6a3374cc..feeff260 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -78,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 94aafe25..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) @@ -71,20 +71,29 @@ end) RegisterServerEvent('esx_lscustom:refreshOwnedVehicle') 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 - local veh = NetworkGetEntityFromNetworkId(netId) + 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 + end else print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source)) end