Merge pull request #1488 from esx-framework/1.11.2-hotfix

1.11.2 hotfix
This commit is contained in:
Arctos2win
2024-11-18 23:01:22 +01:00
committed by GitHub
27 changed files with 50 additions and 36 deletions
+12 -2
View File
@@ -389,7 +389,12 @@ function ESX.UI.Menu.Close(menuType, namespace, name, cancel)
if not cancel then
ESX.UI.Menu.Opened[i].close()
else
ESX.UI.Menu.Opened[i].cancel()
local menu = ESX.UI.Menu.Opened[i]
ESX.UI.Menu.RegisteredTypes[menu.type].close(menu.namespace, menu.name)
if type(menu.cancel) ~= "nil" then
menu.cancel(menu.data, menu)
end
end
ESX.UI.Menu.Opened[i] = nil
end
@@ -405,7 +410,12 @@ function ESX.UI.Menu.CloseAll(cancel)
if not cancel then
ESX.UI.Menu.Opened[i].close()
else
ESX.UI.Menu.Opened[i].cancel()
local menu = ESX.UI.Menu.Opened[i]
ESX.UI.Menu.RegisteredTypes[menu.type].close(menu.namespace, menu.name)
if type(menu.cancel) ~= "nil" then
menu.cancel(menu.data, menu)
end
end
ESX.UI.Menu.Opened[i] = nil
end
+1 -1
View File
@@ -14,7 +14,7 @@ local function ApplyMetadata(metadata)
end
end
ESX.SecureNetEvent("esx:playerLoaded", function(xPlayer, _, skin)
RegisterNetEvent("esx:playerLoaded", function(xPlayer, _, skin)
ESX.PlayerData = xPlayer
if not Config.Multichar then
@@ -45,9 +45,9 @@ function Actions:TrackPed()
if playerPed ~= newPed then
ESX.PlayerData.ped = newPed
ESX.SetPlayerData("ped", playerPed)
ESX.SetPlayerData("ped", newPed)
TriggerEvent("esx:playerPedChanged", playerPed)
TriggerEvent("esx:playerPedChanged", newPed)
end
end
@@ -10,7 +10,7 @@ end
function Adjustments:DisableAimAssist()
if Config.DisableAimAssist then
SetPlayerLockon(ESX.playerId, false)
SetPlayerTargetingMode(3)
end
end
+1 -1
View File
@@ -9,7 +9,7 @@ local function checkPhone()
npwd:setPhoneDisabled((phoneItem and phoneItem.count or 0) <= 0)
end
ESX.SecureNetEvent("esx:playerLoaded", checkPhone)
RegisterNetEvent("esx:playerLoaded", checkPhone)
AddEventHandler("onClientResourceStart", function(resource)
if resource ~= "npwd" then
+1 -1
View File
@@ -12,7 +12,7 @@ if not IsDuplicityVersion() then -- Only register this event for the client
end
end)
ESX.SecureNetEvent("esx:playerLoaded", function(xPlayer)
RegisterNetEvent("esx:playerLoaded", function(xPlayer)
ESX.PlayerData = xPlayer
ESX.PlayerLoaded = true
end)
-1
View File
@@ -1 +0,0 @@
@import"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";body{font-family:sans-serif;overflow:hidden;background-color:transparent}.none{display:none}.dialog{width:477px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#080808;border-radius:8px;border:none;color:#fff;font-family:Poppins,sans-serif}.dialog__header{background-color:#040404;border-top-left-radius:8px;border-top-right-radius:8px;padding:20px;text-align:center}.dialog__header h1{font-weight:700;margin-bottom:0;font-size:30px}.dialog__header span{color:#fd9800}.dialog__body{padding-block:20px;padding-inline:65px}.dialog__body-hint{text-align:center;margin-bottom:20px}.dialog__body-form{display:flex;flex-direction:column;gap:35px;font-weight:600;font-size:15px}.dialog__form-submit{border:none;background-color:#fd9800;color:#fff;font-size:18px;font-weight:700;border-radius:4px;padding-block:5px}.dialog__form-submit i{margin-right:5px}.dialog__form-group{display:flex;align-items:center;justify-content:space-between;gap:30px;background-color:#040404;position:relative}.dialog__form-group--radio{gap:0}.dialog__form-group label{text-align:center;flex-grow:1;flex-shrink:1;padding-inline:20px}.dialog__form-group input{background-color:transparent;border:none;height:30px;width:180px;flex-shrink:0;color:#fff}.dialog__form-group input:focus{background-color:#0f0f0fe6;border:none;border-radius:5px;color:#fff;outline:none;box-shadow:none}.dialog__form-validation{position:relative}.dialog__form-validation i{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.dialog__form-radio{display:flex;align-items:center}.dialog__form-radio input{display:none}.dialog__form-radio label{display:flex;align-items:center;gap:10px;cursor:pointer}.dialog__form-radio input+label{height:30px;display:flex;align-items:center}.dialog__form-radio input:checked+label{color:#30a1fd;height:30px}.dialog__form-radio input:not(:checked)+label{color:#242424;height:30px}.dialog__form-message{position:absolute;top:35px;right:0;font-size:9px}.dialog__form-message--error{color:#733838}#male:checked+label{color:#30a1fd}#female:checked+label{color:#ff69b4}::placeholder{color:#242424;font-weight:600}
+3 -3
View File
@@ -24,10 +24,10 @@ client_scripts {
}
files ({
'dist/assets/**',
'dist/**',
'web/dist/assets/**',
'web/dist/**',
})
ui_page 'dist/index.html'
ui_page 'web/dist/index.html'
dependency 'es_extended'
+3 -1
View File
@@ -243,6 +243,8 @@ end
ESX.RegisterServerCallback("esx_identity:registerIdentity", function(source, cb, data)
local xPlayer = ESX.GetPlayerFromId(source)
data.dateofbirth = formatDate(data.dateofbirth)
if not checkNameFormat(data.firstname) then
TriggerClientEvent("esx:showNotification", source, TranslateCap("invalid_firstname_format"), "error")
return cb(false)
@@ -272,7 +274,7 @@ end
playerIdentity[xPlayer.identifier] = {
firstName = formatName(data.firstname),
lastName = formatName(data.lastname),
dateOfBirth = formatDate(data.dateofbirth),
dateOfBirth = data.dateofbirth,
sex = data.sex,
height = data.height,
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
@import"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";body{font-family:sans-serif;overflow:hidden;background-color:transparent}.none{display:none}.dialog{width:477px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#080808;border-radius:8px;border:none;color:#fff;font-family:Poppins,sans-serif}.dialog__header{background-color:#040404;border-top-left-radius:8px;border-top-right-radius:8px;padding:20px;text-align:center}.dialog__header h1{font-weight:700;margin-bottom:0;font-size:30px}.dialog__header span{color:#fd9800}.dialog__body{padding-block:20px;padding-inline:65px}.dialog__body-hint{text-align:center;margin-bottom:20px}.dialog__body-form{display:flex;flex-direction:column;gap:35px;font-weight:600;font-size:15px}.dialog__form-submit{border:none;background-color:#fd9800;color:#fff;font-size:18px;font-weight:700;border-radius:4px;padding-block:5px}.dialog__form-submit i{margin-right:5px}.dialog__form-group{display:flex;align-items:center;justify-content:space-between;gap:30px;background-color:#040404;position:relative}.dialog__form-group--radio{gap:0}.dialog__form-group label{flex-grow:1;flex-shrink:1;padding-inline:20px}.dialog__form-group input{background-color:transparent;border:none;height:30px;width:180px;flex-shrink:0;color:#fff}.dialog__form-group input:focus{background-color:#0f0f0fe6;border:none;border-radius:5px;color:#fff;outline:none;box-shadow:none}.dialog__form-validation{position:relative}.dialog__form-validation i{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.dialog__form-radio{display:flex;align-items:center}.dialog__form-radio input{display:none}.dialog__form-radio label{display:flex;align-items:center;gap:10px;cursor:pointer}.dialog__form-radio input+label{height:30px;display:flex;align-items:center}.dialog__form-radio input:checked+label{color:#30a1fd;height:30px}.dialog__form-radio input:not(:checked)+label{color:#242424;height:30px}.dialog__form-message{position:absolute;top:35px;right:0;font-size:9px}.dialog__form-message--error{color:#733838}#male:checked+label{color:#30a1fd}#female:checked+label{color:#ff69b4}::placeholder{color:#242424;font-weight:600}input[type=date]::-webkit-inner-spin-button,input[type=date]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none}
@@ -11,8 +11,8 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"
integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script type="module" crossorigin src="./assets/index-CaT4lk_v.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-B6T-7u2-.css">
<script type="module" crossorigin src="./assets/index-BR-kw549.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CBKwBtku.css">
</head>
<body class="none">

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -1,6 +1,6 @@
<script setup>
import { onMounted } from 'vue';
import HelloWorld from './components/HelloWorld.vue'
import Identity from './components/Identity.vue'
onMounted(() => {
fetch("http://esx_identity/ready", {
@@ -18,7 +18,7 @@ onMounted(() => {
</script>
<template>
<HelloWorld/>
<Identity/>
</template>
<style scoped>

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 496 B

@@ -10,7 +10,7 @@ const onSubmit = (values) => {
body: JSON.stringify({
firstname: values.firstname,
lastname: values.lastname,
dateofbirth: values.dob,
dateofbirth: moment(values.dob).format("DD/MM/YYYY"),
sex: values.gender,
height: values.height,
}),
@@ -20,10 +20,10 @@ const onSubmit = (values) => {
const schema = yup.object({
firstname: yup.string().required('Firstname is required').min(3, 'Firstname must be at least 3 characters'),
lastname: yup.string().required('Lastname is required').min(3, 'Lastname must be at least 3 characters'),
dob: yup.date().required('Date of Birth is required').transform((value, originalValue) => {
const parsedDate = moment(originalValue, 'DD/MM/YYYY', true);
return parsedDate.isValid() ? parsedDate.toDate() : new Date('');
}).typeError('Date must be in mm/dd/yyyy format'),
dob: yup.date()
.required('Date of Birth is required')
.min(new Date("1900-01-01"), "Date is too early")
.max(moment().subtract(1, 'years').toDate(), "You need to be atleast 1 year old"),
gender: yup.string().required('Gender is required'),
height: yup.number().required('Height is required').min(120, 'Minimum height is 120cm').max(220, 'Maximum height is 220cm').typeError('Amount must be a number'),
})
@@ -42,7 +42,6 @@ const schema = yup.object({
<label for="firstname">Firstname</label>
<div class="dialog__form-validation">
<Field id="firstname" type="text" name="firstname" placeholder="Firstname" validateOnInput />
<!-- <i class="fas fa-check-circle" style="color: #478444;"></i> -->
</div>
<ErrorMessage name="firstname" class="dialog__form-message dialog__form-message--error" />
</div>
@@ -50,13 +49,12 @@ const schema = yup.object({
<label for="lastname">Lastname</label>
<div class="dialog__form-validation">
<Field id="lastname" type="text" name="lastname" placeholder="Lastname" validateOnInput />
<!-- <i class="fas fa-times-circle" style="color: #733838;"></i> -->
</div>
<ErrorMessage name="lastname" class="dialog__form-message dialog__form-message--error" />
</div>
<div class="dialog__form-group">
<label for="dob">Date of birth</label>
<Field id="dob" type="text" name="dob" placeholder="mm/dd/yyyy" validateOnInput />
<Field id="dob" type="date" name="dob" placeholder="dd/mm/yyyy" validateOnInput />
<ErrorMessage name="dob" class="dialog__form-message dialog__form-message--error" />
</div>
<div class="dialog__form-group">
@@ -96,7 +96,6 @@ body {
}
.dialog__form-group label {
text-align: center;
flex-grow: 1; /* Label will expand to fill available space */
flex-shrink: 1; /* Allows the label to shrink if necessary */
padding-inline: 20px; /* Horizontal padding */
@@ -187,4 +186,10 @@ body {
::placeholder {
color: #242424;
font-weight: 600;
}
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
display: none;
-webkit-appearance: none;
}
+1 -1
View File
@@ -33,7 +33,7 @@ ESX.SecureNetEvent("esx_multicharacter:SetupUI", function(data, slots)
Multicharacter:SetupUI(data, slots)
end)
ESX.SecureNetEvent('esx:playerLoaded', function(playerData, isNew, skin)
RegisterNetEvent('esx:playerLoaded', function(playerData, isNew, skin)
Multicharacter:PlayerLoaded(playerData, isNew, skin)
end)
+2 -2
View File
@@ -70,7 +70,7 @@ AddEventHandler("esx_skin:playerRegistered", function()
end)
end)
ESX.SecureNetEvent("esx:playerLoaded", function(_, _, skin)
RegisterNetEvent("esx:playerLoaded", function(_, _, skin)
ESX.PlayerLoaded = true
TriggerServerEvent("esx_skin:setWeight", skin)
end)
@@ -80,7 +80,7 @@ RegisterNetEvent("esx_skin:openMenu", function(submitCb, cancelCb)
end)
RegisterNetEvent("esx_skin:openRestrictedMenu", function(submitCb, cancelCb, restrict)
Menu:Open(submitCb, cancelCb, nil)
Menu:Open(submitCb, cancelCb, restrict)
end)
RegisterNetEvent("esx_skin:openSaveableMenu", function(submitCb, cancelCb)
+5 -6
View File
@@ -104,7 +104,7 @@ function SkinChanger:ValidClothes(key)
["blemishes_2"] = true, ["blemishes_3"] = true, ["blush_1"] = true, ["blush_2"] = true, ["blush_3"] = true, ["complexion_1"] = true, ["complexion_2"] = true,
["sun_1"] = true, ["sun_2"] = true, ["moles_1"] = true, ["moles_2"] = true, ["chest_1"] = true, ["chest_2"] = true, ["chest_3"] = true, ["bodyb_1"] = true,
["bodyb_2"] = true, ["bodyb_3"] = true, ["bodyb_4"] = true}
return keys[key] ~= nil
return keys[key] == nil
end
local function Normalise(weight, divison)
@@ -140,7 +140,7 @@ function SkinChanger:SetFace()
end
function SkinChanger:SetHeadOverlay()
local features = {{"age_1", "age_2"}, {"blemishes_1", "blemishes_2"}, {"beard_1", "beard_2"}, {"eyebrows_1", "eyebrows_2"}, {"makeup_1", "makeup_2"}, {"lipstick_1", "lipstick_2"}, {"blush_1", "blush_2"}, {"complexion_1", "complexion_2"}, {"sun_1", "sun_2"}, {"moles_1", "moles_2"}, {"chest_1", "chest_2"}}
local features = {{"blemishes_1", "blemishes_2"}, {"beard_1", "beard_2"}, {"eyebrows_1", "eyebrows_2"}, {"age_1", "age_2"}, {"makeup_1", "makeup_2"}, {"blush_1", "blush_2"}, {"complexion_1", "complexion_2"}, {"sun_1", "sun_2"}, {"lipstick_1", "lipstick_2"}, {"moles_1", "moles_2"}, {"chest_1", "chest_2"}}
for i = 1, #features, 1 do
local feature = features[i]
SetPedHeadOverlay(self.playerPed, i - 1, self.character[feature[1]], Normalise(self.character[feature[2]], 10))
@@ -148,10 +148,9 @@ function SkinChanger:SetHeadOverlay()
end
function SkinChanger:SetHeadOverlayColour()
local features = {{"beard_3", "beard_4"}, {"eyebrows_3", "eyebrows_4"}, {"makeup_3", "makeup_4"}, {"lipstick_3", "lipstick_4"}, {"blush_3", 0}, {"chest_3", 0}}
for i = 1, #features, 1 do
local feature = features[i]
SetPedHeadOverlayColor(self.playerPed, i - 1, 1, self.character[feature[1]], self.character[feature[2]])
local features = {[1] = {"beard_3", "beard_4"}, [2] = {"eyebrows_3", "eyebrows_4"}, [4] = {"makeup_3", "makeup_4"}, [5] = {"blush_3", 0}, [8] = {"lipstick_3", "lipstick_4"}, [10] = {"chest_3", 0}}
for i, feature in pairs(features) do
SetPedHeadOverlayColor(self.playerPed, i, 1, self.character[feature[1]], self.character[feature[2]])
end
if self.character["bodyb_1"] == -1 then
SetPedHeadOverlay(self.playerPed, 11, 255, (self.character["bodyb_2"] / 10) + 0.0) -- Body Blemishes + opacity