Skip to content

Commit

Permalink
Merge pull request #1488 from esx-framework/1.11.2-hotfix
Browse files Browse the repository at this point in the history
1.11.2 hotfix
  • Loading branch information
Arctos2win authored Nov 18, 2024
2 parents 5d5f14a + 7de4582 commit a3dbde4
Show file tree
Hide file tree
Showing 27 changed files with 50 additions and 36 deletions.
14 changes: 12 additions & 2 deletions [core]/es_extended/client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion [core]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions [core]/es_extended/client/modules/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion [core]/es_extended/client/modules/adjustments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ end

function Adjustments:DisableAimAssist()
if Config.DisableAimAssist then
SetPlayerLockon(ESX.playerId, false)
SetPlayerTargetingMode(3)
end
end

Expand Down
2 changes: 1 addition & 1 deletion [core]/es_extended/client/modules/npwd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion [core]/es_extended/imports.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion [core]/esx_identity/dist/assets/index-B6T-7u2-.css

This file was deleted.

6 changes: 3 additions & 3 deletions [core]/esx_identity/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 3 additions & 1 deletion [core]/esx_identity/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
}
Expand Down
Empty file.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions [core]/esx_identity/web/dist/assets/index-CBKwBtku.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -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", {
Expand All @@ -18,7 +18,7 @@ onMounted(() => {
</script>

<template>
<HelloWorld/>
<Identity/>
</template>

<style scoped>
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
Expand All @@ -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'),
})
Expand All @@ -42,21 +42,19 @@ 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>
<div class="dialog__form-group">
<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">
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}
File renamed without changes.
2 changes: 1 addition & 1 deletion [core]/esx_multicharacter/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions [core]/esx_skin/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions [core]/skinchanger/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -140,18 +140,17 @@ 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))
end
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
Expand Down

0 comments on commit a3dbde4

Please sign in to comment.