From 8dab60e73266c667831802be98ecd1cb9b7ce85d Mon Sep 17 00:00:00 2001 From: JustZerooo Date: Wed, 13 Dec 2023 21:05:02 +0100 Subject: [PATCH 01/57] Adding German Language Support Signed-off-by: JustZerooo --- [core]/esx_identity/locales/de.lua | 38 +++++++++ [core]/esx_multicharacter/locales/de.lua | 32 ++++++++ [core]/esx_skin/locales/de.lua | 6 ++ [core]/skinchanger/locales/de.lua | 100 +++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 [core]/esx_identity/locales/de.lua create mode 100644 [core]/esx_multicharacter/locales/de.lua create mode 100644 [core]/esx_skin/locales/de.lua create mode 100644 [core]/skinchanger/locales/de.lua diff --git a/[core]/esx_identity/locales/de.lua b/[core]/esx_identity/locales/de.lua new file mode 100644 index 00000000..e7760183 --- /dev/null +++ b/[core]/esx_identity/locales/de.lua @@ -0,0 +1,38 @@ +Locales["de"] = { + ["show_active_character"] = "Aktiven Charakter anzeigen", + ["active_character"] = "Aktiver Charakter: %s", + ["error_active_character"] = "Beim Abrufen Ihrer Daten ist ein Fehler aufgetreten", + ["delete_character"] = "Lösche deinen aktuellen Charakter.", + ["deleted_character"] = "Charakter gelöscht", + ["error_delete_character"] = "Es gab ein Problem beim löschen deines Charakters.", + ["thank_you_for_registering"] = "Registrierung erfolgreich. Enjoy!", + ["debug_xPlayer_get_first_name"] = "Gibt Ihren Vornamen zurück", + ["debug_xPlayer_get_last_name"] = "Gibt Ihren Nachnamen zurück", + ["debug_xPlayer_get_full_name"] = "Gibt Ihren vollständigen Namen zurück", + ["debug_xPlayer_get_sex"] = "Gibt dein Geschlecht zurück", + ["debug_xPlayer_get_dob"] = "Gibt dein Geburtsdatum zurück", + ["debug_xPlayer_get_height"] = "Gibt deine Größe zurück", + ["error_debug_xPlayer_get_first_name"] = "Es gab ein Problem beim Abrufen deines Vornamens.", + ["error_debug_xPlayer_get_last_name"] = "Es gab ein Problem beim Ermitteln deines Nachnamens.", + ["error_debug_xPlayer_get_full_name"] = "Es gab ein Problem beim Abrufen deines vollständigen Namens.", + ["error_debug_xPlayer_get_sex"] = "Es gab ein Problem bei der Ermittlung deines Geschlechts.", + ["error_debug_xPlayer_get_dob"] = "Es gab ein Problem bei der Ermittlung deines Geburtsdatums.", + ["error_debug_xPlayer_get_height"] = "Es gab ein Problem bei der Ermittlung Ihrer Größe.", + ["return_debug_xPlayer_get_first_name"] = "Vorname: %s", + ["return_debug_xPlayer_get_last_name"] = "Nachname: %s", + ["return_debug_xPlayer_get_full_name"] = "Name: %s", + ["return_debug_xPlayer_get_sex"] = "Geschlecht: %s", + ["return_debug_xPlayer_get_dob"] = "Geburtstag: %s", + ["return_debug_xPlayer_get_height"] = "Größe: %s CM", + ["data_incorrect"] = "Ungültige Daten, bitte versuche es erneut", + ["invalid_format"] = "Ungültiges Datenformat, bitte versuche es erneut.", + ["no_identifier"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identifier-missing\n\nDies wird dadurch verursacht, dass dein Bezeichner fehlt. Bitte komme später wieder oder melde dieses Problem dem Support.", + ["missing_identity"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identity-missing\n\nEs scheint, dass deine Identität fehlt, versuche erneut, eine Verbindung herzustellen.", + ["deleted_identity"] = "Charakter gelöscht. Bitte verbindedich erneut, um einen neuen Charakter zu erstellen.", + ["already_registered"] = "Du hast dich bereits registriert.", + ["invalid_firstname_format"] = "Ungültiges Format (Vorname): Bitte versuche es erneut.", + ["invalid_lastname_format"] = "Ungültiges Format (Nachname): Bitte versuche es noch einmal.", + ["invalid_dob_format"] = "Ungültiges Format (Geburtstag): Bitte versuche es noch einmal.", + ["invalid_sex_format"] = "Ungültiges Format (Geschlecht): Bitte versuche es erneut.", + ["invalid_height_format"] = "Ungültiges Format (Größe): Bitte versuche es erneut.", +} \ No newline at end of file diff --git a/[core]/esx_multicharacter/locales/de.lua b/[core]/esx_multicharacter/locales/de.lua new file mode 100644 index 00000000..17c004fe --- /dev/null +++ b/[core]/esx_multicharacter/locales/de.lua @@ -0,0 +1,32 @@ +Locales["de"] = { + [" male"] = "Männlich", + [" female"] = "Weiblich", + ["select_char"] = "Charakter Auswählen", + ["select_char_description"] = "Wähle einen Charakter aus, als den du spielen willst.", + ["create_char"] = "Neuer Charakter", + ["char_play"] = "Spielen", + ["char_play_description"] = "Weiter in die Stadt.", + ["char_disabled"] = "Deaktiviert", + ["char_disabled_description"] = "Dieser Charakter ist unbrauchbar.", + ["char_delete"] = "Löschen", + ["char_delete_description"] = "Dieser Charakter wird dauerhaft entfernt.", + ["char_delete_confirmation"] = "Löschbestätigung", + ["char_delete_confirmation_description"] = "Bist du sicher, dass du den ausgewählten Charakter entfernen willst?", + ["char_delete_yes_description"] = "Ja, ich bin sicher, dass ich den ausgewählten Charakter lösche", + ["char_delete_no_description"] = "Nein, zurück zu den Charakteroptionen", + ["character"] = " Charakter: %s", + ["return"] = "Zurück", + ["return_description"] = "Zur Charakterauswahl zurückkehren.", + ["command_setslots"] = "Anzahl der Multicharakter-Slots eines Spielers festlegen", + ["command_remslots"] = "Die Anzahl der Multicharakter-Slots eines Spielers entfernen", + ["command_enablechar"] = "Aktiviere einen bestimmten Charakter eines Spielers", + ["command_disablechar"] = "Einen bestimmten Charakter eines Spielers deaktivieren", + ["command_charslot"] = "Slotnummer des Charakters", + ["command_identifier"] = "Spieler-Identifikator", + ["command_slots"] = "# of slots", + ["slotsadd"] = "Du hast %s Slots auf %s gesetzt", + ["slotsrem"] = "Du hast Slots auf %s entfernt", + ["charenabled"] = "Du hast den Charakter #%s von %s aktiviert", + ["chardisabled"] = "Du hast den Charakter #%s von %s deaktiviert", + ["charnotfound"] = "Charakter #%s von %s existiert nicht", +} \ No newline at end of file diff --git a/[core]/esx_skin/locales/de.lua b/[core]/esx_skin/locales/de.lua new file mode 100644 index 00000000..4d6b27fb --- /dev/null +++ b/[core]/esx_skin/locales/de.lua @@ -0,0 +1,6 @@ +Locales["de"] = { + ["skin_menu"] = "Skin Menu", + ["use_rotate_view"] = "Verwende ~INPUT_FRONTEND_LS~ und ~INPUT_CHARACTER_WHEEL~, um die Ansicht zu drehen.", + ["skin"] = "Skin ändern", + ["saveskin"] = "Skin in einer Datei speichern", + } \ No newline at end of file diff --git a/[core]/skinchanger/locales/de.lua b/[core]/skinchanger/locales/de.lua new file mode 100644 index 00000000..7bea236c --- /dev/null +++ b/[core]/skinchanger/locales/de.lua @@ -0,0 +1,100 @@ +Locales["de"] = { + ["sex"] = "Geschlecht", + ["mom"] = "Mutters Gesicht", + ["dad"] = "Vaters Gesicht", + ["resemblance"] = "Ähnlichkeit", + ["skin_tone"] = "Hautton", + ["nose_1"] = "Nasenbreite", + ["nose_2"] = "Höhe der Nasenspitze", + ["nose_3"] = "Länge der Nasenspitze", + ["nose_4"] = "Nasenbeinhöhe", + ["nose_5"] = "Nasenspitzenabsenkung", + ["nose_6"] = "Nasenbeinverdrehung", + ["cheeks_1"] = "Wangenknochenhöhe", + ["cheeks_2"] = "Wangenknochenbreite", + ["cheeks_3"] = "Wangenbreite", + ["lip_fullness"] = "Lippenfülle", + ["jaw_bone_width"] = "Kieferknochenbreite", + ["jaw_bone_length"] = "Kieferknochenlänge", + ["chin_height"] = "Kinnhöhe", + ["chin_length"] = "Kinnlänge", + ["chin_width"] = "Kinnbreite", + ["chin_hole"] = "Kinnlochgröße", + ["neck_thickness"] = "Halsdicke", + ["wrinkles"] = "Falten", + ["wrinkle_thickness"] = "Faltenstärke", + ["beard_type"] = "Barttyp", + ["beard_size"] = "Bartgröße", + ["beard_color_1"] = "Bartfarbe 1", + ["beard_color_2"] = "Bartfarbe 2", + ["hair_1"] = "Haar 1", + ["hair_2"] = "Haar 2", + ["hair_color_1"] = "Haarfarbe 1", + ["hair_color_2"] = "Haarfarbe 2", + ["eye_color"] = "Augenfarbe", + ["eye_squint"] = "Augenblinzeln", + ["eyebrow_type"] = "Augenbrauentyp", + ["eyebrow_size"] = "Augenbrauengröße", + ["eyebrow_color_1"] = "Augenbrauenfarbe 1", + ["eyebrow_color_2"] = "Augenbrauenfarbe 2", + ["eyebrow_depth"] = "Augenbrauentiefe", + ["eyebrow_height"] = "Augenbrauenhöhe", + ["makeup_type"] = "Makeup-Typ", + ["makeup_thickness"] = "Makeup-Dicke", + ["makeup_color_1"] = "Schminkfarbe 1", + ["makeup_color_2"] = "Schminkfarbe 2", + ["lipstick_type"] = "Lippenstifttyp", + ["lipstick_thickness"] = "Lippenstiftdicke", + ["lipstick_color_1"] = "Lippenstiftfarbe 1", + ["lipstick_color_2"] = "Lippenstiftfarbe 2", + ["ear_accessories"] = "Ohrenzubehör", + ["ear_accessories_color"] = "Ohrenzubehör Farbe", + ["tshirt_1"] = "T-Shirt 1", + ["tshirt_2"] = "T-Shirt 2", + ["torso_1"] = "Oberkörper 1", + ["torso_2"] = "Oberkörper 2", + ["decals_1"] = "Abziehbilder 1", + ["decals_2"] = "Abziehbilder 2", + ["arms"] = "Arme", + ["arms_2"] = "Arme 2", + ["pants_1"] = "Hose 1", + ["pants_2"] = "Hose 2", + ["schuhe_1"] = "Schuhe 1", + ["Schuhe_2"] = "Schuhe 2", + ["mask_1"] = "Maske 1", + ["mask_2"] = "Maske 2", + ["bproof_1"] = "Kugelsichere Weste 1", + ["bproof_2"] = "Kugelsichere Weste 2", + ["chain_1"] = "Kette 1", + ["chain_2"] = "Kette 2", + ["helmet_1"] = "Helm 1", + ["helmet_2"] = "Helm 2", + ["watches_1"] = "Uhren 1", + ["watches_2"] = "Uhren 2", + ["bracelets_1"] = "Armbänder 1", + ["bracelets_2"] = "Armbänder 2", + ["glasses_1"] = "Brille 1", + ["glasses_2"] = "Brille 2", + ["bag"] = "Tasche", + ["bag_color"] = "Taschenfarbe", + ["blemishes"] = "Schönheitsfehler", + ["blemishes_size"] = "Flecken-Dicke", + ["ageing"] = "Alterung", + ["ageing_1"] = "Alterungsdicke", + ["blush"] = "Erröten", + ["blush_1"] = "Rouge-Dicke", + ["blush_color"] = "Errötungsfarbe", + ["complexion"] = "Teint", + ["complexion_1"] = "Teintstärke", + ["sun"] = "Sonne", + ["sun_1"] = "Sonnenstärke", + ["sommersprossen"] = "Sommersprossen", + ["sommersprossen_1"] = "Sommersprossen Stärke", + ["chest_hair"] = "Brusthaar", + ["chest_hair_1"] = "Brusthaardicke", + ["chest_color"] = "Brusthaarfarbe", + ["bodyb"] = "Körpermakel", + ["bodyb_size"] = "Körpermakel-Dicke", + ["bodyb_extra"] = "Körperflecken-Effekt", + ["bodyb_extra_thickness"] = "Flecken Körper Effekt Dicke", +} From cfd62c7a31f9804835f58b0a751bdf7cf7e7d3b5 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:27:42 +0100 Subject: [PATCH 02/57] Fix VehicleProperties function and remove credits --- [core]/es_extended/client/main.lua | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index bbc9528d..5e3e4ff4 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -260,32 +260,16 @@ AddEventHandler("esx:restoreLoadout", function() end end) --- Credit: https://github.com/LukeWasTakenn, https://github.com/LukeWasTakenn/luke_garages/blob/master/client/client.lua#L331-L352 AddStateBagChangeHandler("VehicleProperties", nil, function(bagName, _, value) if not value then return end local netId = bagName:gsub("entity:", "") - local timer = GetGameTimer() - while not NetworkDoesEntityExistWithNetworkId(tonumber(netId)) do - Wait(0) - if GetGameTimer() - timer > 10000 then - return - end - end - local vehicle = NetToVeh(tonumber(netId)) - local timer2 = GetGameTimer() - while NetworkGetEntityOwner(vehicle) ~= PlayerId() do - Wait(0) - if GetGameTimer() - timer2 > 10000 then - return - end - end - + ESX.Game.SetVehicleProperties(vehicle, value) -end) +end) RegisterNetEvent("esx:setAccountMoney") AddEventHandler("esx:setAccountMoney", function(account) From 809b3970176c899d17c8a4f2d4b35aa4aecc3f9f Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:51:31 +0100 Subject: [PATCH 03/57] Remove or statements that don't do stuff --- [core]/esx_notify/Notify.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/esx_notify/Notify.lua b/[core]/esx_notify/Notify.lua index 44f19fb6..d47066f8 100644 --- a/[core]/esx_notify/Notify.lua +++ b/[core]/esx_notify/Notify.lua @@ -25,8 +25,8 @@ local function Notify(notificatonType, length, message) end SendNuiMessage(json.encode({ - type = notificatonType or "info", - length = length or 3000, + type = notificatonType, + length = length, message = message or "ESX-Notify", })) end From 0b370c70e8a18164c597150370121ffa90ecf677 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:57:21 +0100 Subject: [PATCH 04/57] minimize doesjobexist function --- [core]/es_extended/server/functions.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 38834ddc..1a777c7a 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -549,15 +549,7 @@ if not Config.OxInventory then end function ESX.DoesJobExist(job, grade) - grade = tostring(grade) - - if job and grade then - if ESX.Jobs[job] and ESX.Jobs[job].grades[grade] then - return true - end - end - - return false + return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false end function Core.IsPlayerAdmin(playerId) From e8b80f26f8673b91eedaa360b2aefa5574458854 Mon Sep 17 00:00:00 2001 From: RoyaleWind <61204500+RoyaleWind@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:37:02 +0200 Subject: [PATCH 05/57] Added Greek language to multicharcter --- [core]/esx_multicharacter/locales/gr.lua | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 [core]/esx_multicharacter/locales/gr.lua diff --git a/[core]/esx_multicharacter/locales/gr.lua b/[core]/esx_multicharacter/locales/gr.lua new file mode 100644 index 00000000..49b832ca --- /dev/null +++ b/[core]/esx_multicharacter/locales/gr.lua @@ -0,0 +1,32 @@ +Locales["gr"] = { + ["male"] = "Άνδρας", + ["female"] = "Γυναίκα", + ["select_char"] = "Επιλογή Χαρακτήρα", + ["select_char_description"] = "Επιλέξτε ένα χαρακτήρα για να παίξετε.", + ["create_char"] = "Νέος Χαρακτήρας", + ["char_play"] = "Παίξτε", + ["char_play_description"] = "Συνέχεια στην πόλη.", + ["char_disabled"] = "Απενεργοποιημένος", + ["char_disabled_description"] = "Αυτός ο χαρακτήρας δεν είναι χρησιμοποιήσιμος.", + ["char_delete"] = "Διαγραφή", + ["char_delete_description"] = "Διαγράψτε οριστικά αυτόν τον χαρακτήρα.", + ["char_delete_confirmation"] = "Επιβεβαίωση Διαγραφής", + ["char_delete_confirmation_description"] = "Είστε σίγουρος ότι θέλετε να διαγράψετε τον επιλεγμένο χαρακτήρα;", + ["char_delete_yes_description"] = "Ναι, είμαι σίγουρος ότι θέλω να διαγράψω τον επιλεγμένο χαρακτήρα", + ["char_delete_no_description"] = "Όχι, επιστροφή στις επιλογές χαρακτήρα", + ["character"] = "Χαρακτήρας: %s", + ["return"] = "Επιστροφή", + ["return_description"] = "Επιστροφή στην επιλογή χαρακτήρα.", + ["command_setslots"] = "Ορίστε τον αριθμό των slot πολλαπλών χαρακτήρων ενός παίκτη", + ["command_remslots"] = "Αφαιρέστε τον αριθμό των slot πολλαπλών χαρακτήρων ενός παίκτη", + ["command_enablechar"] = "Ενεργοποιήστε έναν συγκεκριμένο χαρακτήρα ενός παίκτη", + ["command_disablechar"] = "Απενεργοποιήστε έναν συγκεκριμένο χαρακτήρα ενός παίκτη", + ["command_charslot"] = "Αριθμός υποδιαίρεσης του χαρακτήρα", + ["command_identifier"] = "Ταυτότητα παίκτη", + ["command_slots"] = "Αριθμός slot", + ["slotsadd"] = "Ορίσατε %s slot σε %s", + ["slotsrem"] = "Αφαιρέσατε slot από τον %s", + ["charenabled"] = "Ενεργοποιήσατε τον χαρακτήρα #%s του %s", + ["chardisabled"] = "Απενεργοποιήσατε τον χαρακτήρα #%s του %s", + ["charnotfound"] = "Ο χαρακτήρας #%s του %s δεν υπάρχει", +} From d98a3af2652a734a64bdbdca3f809f20d9ed9245 Mon Sep 17 00:00:00 2001 From: Metee Tanathip Date: Fri, 9 Feb 2024 16:22:12 +0700 Subject: [PATCH 06/57] feat: add TypeCheck to check value types --- [core]/es_extended/common/functions.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/[core]/es_extended/common/functions.lua b/[core]/es_extended/common/functions.lua index f6414bdc..86f1b910 100644 --- a/[core]/es_extended/common/functions.lua +++ b/[core]/es_extended/common/functions.lua @@ -106,3 +106,25 @@ end function ESX.Round(value, numDecimalPlaces) return ESX.Math.Round(value, numDecimalPlaces) end + +function ESX.TypeCheck(value, ...) + local types = { ... } + + if (#types == 0) then return true end + + local mapType = {} + for i = 1, #types, 1 do + mapType[types[i]] = true + end + + local valueType = type(value) + local requireTypes = table.concat(types, " or ") + local errorMessage = ("bad value (%s expected, got %s)"):format(requireTypes, valueType) + local matches = mapType[valueType] ~= nil + + -- Need feedback on this one, should we assert or return false and error message? + -- i prefer assert, but i'm open to suggestions + assert(matches, errorMessage) + + return matches, errorMessage +end From 77e880a71517426300d6675a47bef321cb98f65f Mon Sep 17 00:00:00 2001 From: Kasey FItton Date: Sun, 11 Feb 2024 15:04:21 +0000 Subject: [PATCH 07/57] refactor: add better descriptions to the fxmanifests --- [core]/cron/fxmanifest.lua | 2 +- [core]/es_extended/fxmanifest.lua | 2 +- [core]/esx_context/fxmanifest.lua | 2 +- [core]/esx_identity/fxmanifest.lua | 2 +- [core]/esx_loadingscreen/fxmanifest.lua | 3 ++- [core]/esx_menu_default/README.md | 4 ++-- [core]/esx_menu_default/fxmanifest.lua | 2 +- [core]/esx_menu_dialog/README.md | 19 +---------------- [core]/esx_menu_dialog/fxmanifest.lua | 2 +- [core]/esx_menu_list/README.md | 26 +----------------------- [core]/esx_menu_list/fxmanifest.lua | 2 +- [core]/esx_multicharacter/fxmanifest.lua | 2 +- [core]/esx_notify/fxmanifest.lua | 2 +- [core]/esx_progressbar/fxmanifest.lua | 2 +- [core]/esx_skin/fxmanifest.lua | 2 +- [core]/esx_textui/fxmanifest.lua | 2 +- [core]/skinchanger/fxmanifest.lua | 2 +- 17 files changed, 19 insertions(+), 59 deletions(-) diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua index 1d0d5298..d6003d08 100644 --- a/[core]/cron/fxmanifest.lua +++ b/[core]/cron/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' -description 'cron' +description 'Allows resources to Run tasks at specific intervals.' lua54 'yes' version '1.10.4' diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index f251e228..e58ad17e 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'cerulean' game 'gta5' -description 'ES Extended' +description 'The Core resource that provides the functionalities for all other resources.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua index 9e184655..c070637c 100644 --- a/[core]/esx_context/fxmanifest.lua +++ b/[core]/esx_context/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'bodacious' game 'gta5' author 'ESX-Framework & Brayden' -description 'Offical ESX Legacy Context Menu' +description 'A simplistic context menu for ESX.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua index a91e66f4..5143cf53 100644 --- a/[core]/esx_identity/fxmanifest.lua +++ b/[core]/esx_identity/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' -description 'ESX Identity' +description 'Allows the player to Pick their characters: Name, Gender, Height and Date-of-birth.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua index c4ddefb0..28d3981d 100644 --- a/[core]/esx_loadingscreen/fxmanifest.lua +++ b/[core]/esx_loadingscreen/fxmanifest.lua @@ -1,8 +1,9 @@ game 'common' -version '1.10.4' fx_version 'cerulean' author 'ESX-Framework' +description 'A simple but beautiful Loading Screen for your server!' + lua54 'yes' loadscreen 'index.html' diff --git a/[core]/esx_menu_default/README.md b/[core]/esx_menu_default/README.md index b06d5124..a9c1bb45 100644 --- a/[core]/esx_menu_default/README.md +++ b/[core]/esx_menu_default/README.md @@ -1,13 +1,13 @@

[ESX] Menu Defualt

Discord - Website - Documentation -A defualt List type menu for ESX. +A default List type menu for ESX. ![Preview_1](https://cdn.discordapp.com/attachments/944789399852417096/997882867336101948/Screenshot_52.png) ![Preview_2](https://cdn.discordapp.com/attachments/944789399852417096/997882867688411176/Screenshot_53.png) ## Legal -esx_menu_defualt - Default Menu! +esx_menu_default - Default Menu! Copyright (C) 2015-2023 Jérémie N'gadi diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua index 56d8b1b3..5ac9f798 100644 --- a/[core]/esx_menu_default/fxmanifest.lua +++ b/[core]/esx_menu_default/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' -description 'ESX Menu Default' +description 'A basic menu system for ESX Legacy.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_menu_dialog/README.md b/[core]/esx_menu_dialog/README.md index e1d9c85a..3a50de88 100644 --- a/[core]/esx_menu_dialog/README.md +++ b/[core]/esx_menu_dialog/README.md @@ -1,23 +1,6 @@ # esx_menu_dialog Simple script used for inputs. -## Download & Installation - -### Using [fvm](https://github.com/qlaffont/fvm-installer) -``` -fvm install --save --folder=esx esx-org/esx_menu_dialog -``` - -### Using Git -``` -cd resources -git clone https://github.com/ESX-Org/esx_menu_dialog [esx]/esx_menu_dialog -``` - -### Manually -- Download https://github.com/ESX-Org/esx_menu_dialog/archive/master.zip -- Put it in the `[esx]` directory - ## Installation - Add this to your `server.cfg`: @@ -29,7 +12,7 @@ start esx_menu_dialog ### License esx_menu_dialog - input dialog for ESX -Copyright (C) 2015-2023 Jérémie N'gadi +Copyright (C) 2015-2024 ESX-Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua index 093858a8..a69b764b 100644 --- a/[core]/esx_menu_dialog/fxmanifest.lua +++ b/[core]/esx_menu_dialog/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' -description 'ESX Menu Dialog' +description 'A basic input dialog for ESX Legacy.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_menu_list/README.md b/[core]/esx_menu_list/README.md index 173045d2..cdfc2fcb 100644 --- a/[core]/esx_menu_list/README.md +++ b/[core]/esx_menu_list/README.md @@ -1,35 +1,11 @@ # esx_menu_list Advanced menu inputs for ESX -## Download & Installation - -### Using [fvm](https://github.com/qlaffont/fvm-installer) -``` -fvm install --save --folder=esx esx-org/esx_menu_list -``` - -### Using Git -``` -cd resources -git clone https://github.com/ESX-Org/esx_menu_list [esx]/esx_menu_list -``` - -### Manually -- Download https://github.com/ESX-Org/esx_menu_list/archive/master.zip -- Put it in the `[esx]` directory - -## Installation -- Add this to your `server.cfg`: - -``` -start esx_menu_list -``` - # Legal ### License esx_menu_list - advanced menu inputs for ESX -Copyright (C) 2015-2023 Jérémie N'gadi +Copyright (C) 2015-2024 ESX-Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua index 3e3b930a..d11e1768 100644 --- a/[core]/esx_menu_list/fxmanifest.lua +++ b/[core]/esx_menu_list/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' -description 'ESX Menu List' +description 'A basic table-based menu system for ESX Legacy.' lua54 'yes' version '1.10.4' diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua index ec7bd817..99db8d60 100644 --- a/[core]/esx_multicharacter/fxmanifest.lua +++ b/[core]/esx_multicharacter/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' author 'ESX-Framework - Linden - KASH' -description 'Official Multicharacter System For ESX Legacy' +description 'Allows players to have multiple characters on the same account.' version '1.10.4' lua54 'yes' diff --git a/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua index f3f42802..a90cf7cf 100644 --- a/[core]/esx_notify/fxmanifest.lua +++ b/[core]/esx_notify/fxmanifest.lua @@ -4,7 +4,7 @@ lua54 'yes' game 'gta5' version '1.10.4' author 'ESX-Framework' -description 'Official NUI Notification system for ESX' +description 'A beautiful and simple NUI notification system for ESX' shared_script '@es_extended/imports.lua' diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua index 11596a63..d3ee7e57 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[core]/esx_progressbar/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' author 'ESX-Framework' lua54 'yes' version '1.10.4' -description 'ESX Progressbar' +description 'a beautiful and simple NUI progress bar for ESX' client_scripts { 'Progress.lua' } shared_script '@es_extended/imports.lua' diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua index 69029cf1..3643d622 100644 --- a/[core]/esx_skin/fxmanifest.lua +++ b/[core]/esx_skin/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' game 'gta5' -description 'ESX Skin' +description 'Allows players to customise their character\'s appearance' version '1.10.4' lua54 'yes' diff --git a/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua index 939ecbe1..a0d2fb32 100644 --- a/[core]/esx_textui/fxmanifest.lua +++ b/[core]/esx_textui/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' version '1.10.4' -description 'ESX TextUI' +description 'A beautiful and simple Persistent Notification system for ESX.' lua54 'yes' client_scripts { 'TextUI.lua' } diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua index 8b12ec90..06a243b6 100644 --- a/[core]/skinchanger/fxmanifest.lua +++ b/[core]/skinchanger/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' lua54 'yes' -description 'Official ESX-Legacy resource for handling the Player`s Skin' +description 'Saves/loads character appearances for ESX Legacy.' version '1.10.4' client_scripts { From 6b45a1a597e0307c9aadad5c96153ccaf6438bf1 Mon Sep 17 00:00:00 2001 From: Metee Tanathip Date: Mon, 12 Feb 2024 04:14:09 +0700 Subject: [PATCH 08/57] refactor: removed `TypeCheck` - replaced `TypeCheck` with `AssertType` this function will assert - add : `ValidateType` this function will return Boolean and error message --- [core]/es_extended/common/functions.lua | 29 +++++++++++++++++-------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/[core]/es_extended/common/functions.lua b/[core]/es_extended/common/functions.lua index 86f1b910..cda9e63b 100644 --- a/[core]/es_extended/common/functions.lua +++ b/[core]/es_extended/common/functions.lua @@ -107,24 +107,35 @@ function ESX.Round(value, numDecimalPlaces) return ESX.Math.Round(value, numDecimalPlaces) end -function ESX.TypeCheck(value, ...) +function ESX.ValidateType(value, ...) local types = { ... } - if (#types == 0) then return true end local mapType = {} for i = 1, #types, 1 do - mapType[types[i]] = true + local validateType = types[i] + assert(type(validateType) == "string", "bad argument types, only expected string") -- should never use anyhing else than string + mapType[validateType] = true end local valueType = type(value) - local requireTypes = table.concat(types, " or ") - local errorMessage = ("bad value (%s expected, got %s)"):format(requireTypes, valueType) - local matches = mapType[valueType] ~= nil - -- Need feedback on this one, should we assert or return false and error message? - -- i prefer assert, but i'm open to suggestions + local matches = (mapType[valueType] ~= nil) + + if not (matches) then + local requireTypes = table.concat(types, " or ") + local errorMessage = ("bad value (%s expected, got %s)"):format(requireTypes, valueType) + + return false, errorMessage + end + + return true +end + +function ESX.AssertType(...) + local matches, errorMessage = ESX.ValidateType(...) + assert(matches, errorMessage) - return matches, errorMessage + return matches end From a5c2cb1c5db13004cbbd0734949ebb49f150275d Mon Sep 17 00:00:00 2001 From: Marcel <70572904+Marlox4@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:03:11 +0100 Subject: [PATCH 09/57] Update actions.lua Add ESX.PlayerData.seat and ESX.PlayerData.vehicle --- [core]/es_extended/client/modules/actions.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index 0fec4584..3d263b1f 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -64,11 +64,15 @@ CreateThread(function() isEnteringVehicle = true TriggerEvent("esx:enteringVehicle", vehicle, plate, seat, netId) TriggerServerEvent("esx:enteringVehicle", plate, seat, netId) + ESX.SetPlayerData("vehicle", vehicle) + ESX.SetPlayerData("seat", seat) elseif not DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not IsPedInAnyVehicle(playerPed, true) and isEnteringVehicle then -- vehicle entering aborted TriggerEvent("esx:enteringVehicleAborted") TriggerServerEvent("esx:enteringVehicleAborted") isEnteringVehicle = false + ESX.SetPlayerData("vehicle", false) + ESX.SetPlayerData("seat", false) elseif IsPedInAnyVehicle(playerPed, false) then -- suddenly appeared in a vehicle, possible teleport isEnteringVehicle = false @@ -79,6 +83,8 @@ CreateThread(function() current.displayName, current.netId = GetData(current.vehicle) TriggerEvent("esx:enteredVehicle", current.vehicle, current.plate, current.seat, current.displayName, current.netId) TriggerServerEvent("esx:enteredVehicle", current.plate, current.seat, current.displayName, current.netId) + ESX.SetPlayerData("vehicle", vehicle) + ESX.SetPlayerData("seat", seat) end elseif isInVehicle then if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then @@ -87,6 +93,8 @@ CreateThread(function() TriggerServerEvent("esx:exitedVehicle", current.plate, current.seat, current.displayName, current.netId) isInVehicle = false current = {} + ESX.SetPlayerData("vehicle", false) + ESX.SetPlayerData("seat", false) end end Wait(200) From 6d50eb4fed58ebf9a791228726811731349637c6 Mon Sep 17 00:00:00 2001 From: KeeganAI <53181748+KeeganAI@users.noreply.github.com> Date: Tue, 13 Feb 2024 20:08:09 +0100 Subject: [PATCH 10/57] fix(es_extended/config.lua): Fix Typo Errors Corrected some spelling errors. --- [core]/es_extended/config.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/[core]/es_extended/config.lua b/[core]/es_extended/config.lua index 6f899f1d..3d82a1f0 100644 --- a/[core]/es_extended/config.lua +++ b/[core]/es_extended/config.lua @@ -38,21 +38,21 @@ Config.AdminGroups = { Config.EnablePaycheck = true -- enable paycheck Config.LogPaycheck = false -- Logs paychecks to a nominated Discord channel via webhook (default is false) Config.EnableSocietyPayouts = false -- pay from the society account that the player is employed at? Requirement: esx_society -Config.MaxWeight = 24 -- the max inventory weight without backpack -Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds +Config.MaxWeight = 24 -- the max inventory weight without a backpack +Config.PaycheckInterval = 7 * 60000 -- how often to receive paychecks in milliseconds Config.EnableDebug = false -- Use Debug options? Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 ) Config.EnableWantedLevel = false -- Use Normal GTA wanted Level? Config.EnablePVP = true -- Allow Player to player combat Config.Multichar = GetResourceState("esx_multicharacter") ~= "missing" -Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar) +Config.Identity = true -- Select a character identity data before they have loaded in (this happens by default with multichar) Config.DistanceGive = 4.0 -- Max distance when giving items, weapons etc. Config.AdminLogging = false -- Logs the usage of certain commands by those with group.admin ace permissions (default is false) Config.DisableHealthRegeneration = false -- Player will no longer regenerate health -Config.DisableVehicleRewards = false -- Disables Player Recieving weapons from vehicles +Config.DisableVehicleRewards = false -- Disables Player Receiving weapons from vehicles Config.DisableNPCDrops = false -- stops NPCs from dropping weapons on death Config.DisableDispatchServices = false -- Disable Dispatch services Config.DisableScenarios = false -- Disable Scenarios @@ -85,12 +85,12 @@ Config.RemoveHudComponents = { [22] = false, --HUD_WEAPONS } -Config.SpawnVehMaxUpgrades = true -- admin vehicles spawn with max vehcle settings +Config.SpawnVehMaxUpgrades = true -- admin vehicles spawn with max vehicle settings Config.CustomAIPlates = "........" -- Custom plates for AI vehicles -- Pattern string format --1 will lead to a random number from 0-9. --A will lead to a random letter from A-Z. --- . will lead to a random letter or number, with 50% probability of being either. +-- . will lead to a random letter or number, with a 50% probability of being either. --^1 will lead to a literal 1 being emitted. --^A will lead to a literal A being emitted. --Any other character will lead to said character being emitted. From ffac35cdfe184cc78fa611499cd3dd9a42ab3da2 Mon Sep 17 00:00:00 2001 From: Metee Tanathip Date: Fri, 1 Mar 2024 10:04:36 +0700 Subject: [PATCH 11/57] style: removed brackets --- [core]/es_extended/common/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/common/functions.lua b/[core]/es_extended/common/functions.lua index cda9e63b..0e9adb08 100644 --- a/[core]/es_extended/common/functions.lua +++ b/[core]/es_extended/common/functions.lua @@ -109,7 +109,7 @@ end function ESX.ValidateType(value, ...) local types = { ... } - if (#types == 0) then return true end + if #types == 0 then return true end local mapType = {} for i = 1, #types, 1 do @@ -120,9 +120,9 @@ function ESX.ValidateType(value, ...) local valueType = type(value) - local matches = (mapType[valueType] ~= nil) + local matches = mapType[valueType] ~= nil - if not (matches) then + if not matches then local requireTypes = table.concat(types, " or ") local errorMessage = ("bad value (%s expected, got %s)"):format(requireTypes, valueType) From cefb63144291f7c8ac4c1e0a711ba7e8eb00a907 Mon Sep 17 00:00:00 2001 From: mx developement <62698394+TrymTube@users.noreply.github.com> Date: Sun, 3 Mar 2024 00:13:08 +0100 Subject: [PATCH 12/57] added heading again for xPlayer.getCoords() --- [core]/es_extended/server/classes/player.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index ad3fd030..25e10c54 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -1,5 +1,6 @@ local _GetPlayerPed = GetPlayerPed local _GetEntityCoords = GetEntityCoords +local _GetEntityHeading = GetEntityHeading local _ExecuteCommand = ExecuteCommand local _SetEntityCoords = SetEntityCoords local _SetEntityHeading = SetEntityHeading @@ -80,8 +81,9 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, function self.getCoords(vector) local ped = _GetPlayerPed(self.source) local coordinates = _GetEntityCoords(ped) + local heading = _GetEntityHeading(ped) - return vector and coordinates or { x = coordinates.x, y = coordinates.y, z = coordinates.z } + return vector and vector4(coordinates, heading) or { x = coordinates.x, y = coordinates.y, z = coordinates.z, heading = heading } end ---@param reason string From 1ca85a1002f6c8290e935e8b5b67d953022ffaff Mon Sep 17 00:00:00 2001 From: mx developement <62698394+TrymTube@users.noreply.github.com> Date: Sun, 3 Mar 2024 00:23:47 +0100 Subject: [PATCH 13/57] Update player.lua --- [core]/es_extended/server/classes/player.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index 25e10c54..2b3e6295 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -83,7 +83,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, local coordinates = _GetEntityCoords(ped) local heading = _GetEntityHeading(ped) - return vector and vector4(coordinates, heading) or { x = coordinates.x, y = coordinates.y, z = coordinates.z, heading = heading } + return vector and vector4(coordinates.xyz, heading) or { x = coordinates.x, y = coordinates.y, z = coordinates.z, heading = heading } end ---@param reason string From 16c99135016bdc9db0804ec27ba4f110b417e2bd Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 5 Mar 2024 16:08:46 +0100 Subject: [PATCH 14/57] refactor(client/functions): getting burst tyres of an vehicle in an better way --- [core]/es_extended/client/functions.lua | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index bb545f4e..c6cf706f 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -576,21 +576,15 @@ function ESX.Game.GetVehicleProperties(vehicle) end local doorsBroken, windowsBroken, tyreBurst = {}, {}, {} - local numWheels = tostring(GetVehicleNumberOfWheels(vehicle)) - local TyresIndex = { -- Wheel index list according to the number of vehicle wheels. - ["2"] = { 0, 4 }, -- Bike and cycle. - ["3"] = { 0, 1, 4, 5 }, -- Vehicle with 3 wheels (get for wheels because some 3 wheels vehicles have 2 wheels on front and one rear or the reverse). - ["4"] = { 0, 1, 4, 5 }, -- Vehicle with 4 wheels. - ["6"] = { 0, 1, 2, 3, 4, 5 }, -- Vehicle with 6 wheels. - } - if TyresIndex[numWheels] then - for _, idx in pairs(TyresIndex[numWheels]) do - tyreBurst[tostring(idx)] = IsVehicleTyreBurst(vehicle, idx, false) - end + local wheel_count = GetVehicleNumberOfWheels(vehicle); + + for wheel_index = 0, wheel_count - 1 do + tyreBurst[tostring(wheel_index)] = IsVehicleTyreBurst(vehicle, wheel_index, false) end + for windowId = 0, 7 do -- 13 RollUpWindow(vehicle, windowId) --fix when you put the car away with the window down windowsBroken[tostring(windowId)] = not IsVehicleWindowIntact(vehicle, windowId) From eb0be9b148f096d032042f629415284753a7a5dd Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 5 Mar 2024 16:20:05 +0100 Subject: [PATCH 15/57] perf/refactor(client/functions): replaced k, v loops with for loops where possible --- [core]/es_extended/client/functions.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index bb545f4e..4080b1d8 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -507,10 +507,10 @@ function ESX.Game.GetClosestEntity(entities, isPlayerEntities, coords, modelFilt if modelFilter then filteredEntities = {} - - for _, entity in pairs(entities) do - if modelFilter[GetEntityModel(entity)] then - filteredEntities[#filteredEntities + 1] = entity + + for current_entity_index = 1, #entities do + if modelFilter[GetEntityModel(entities[current_entity_index])] then + filteredEntities[#filteredEntities + 1] = entities[current_entity_index] end end end @@ -1128,8 +1128,8 @@ function ESX.ShowInventory() { unselectable = true, icon = "fas fa-users", title = "Nearby Players" }, } - for _, playerNearby in ipairs(playersNearby) do - players[GetPlayerServerId(playerNearby)] = true + for current_nearby_player_index = 1, #playersNearby do + players[GetPlayerServerId(playersNearby[current_nearby_player_index])] = true end ESX.TriggerServerCallback("esx:getPlayerNames", function(returnedPlayers) From 2dbc339aaffa5a8f0109955ba8869551e61b82f1 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:37:29 +0100 Subject: [PATCH 16/57] chore(LICENSE): update copyright year --- [core]/cron/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/cron/LICENSE b/[core]/cron/LICENSE index e3b0b61c..9ef14b9d 100644 --- a/[core]/cron/LICENSE +++ b/[core]/cron/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. cron - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - cron Copyright (C) 2015-2023 Jérémie N'gadi + cron Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 7b8e4de95557ecebe6f54cdcecd2c551c6ce1bad Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:38:11 +0100 Subject: [PATCH 17/57] chore(LICENSE): update copyright year --- [core]/es_extended/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/LICENSE b/[core]/es_extended/LICENSE index a10f2d96..5f5e070b 100644 --- a/[core]/es_extended/LICENSE +++ b/[core]/es_extended/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. es_extended - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - es_extended Copyright (C) 2015-2023 Jérémie N'gadi + es_extended Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From c18067b3eec51765bbbdf9bbadea41058ccd98be Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:38:29 +0100 Subject: [PATCH 18/57] chore(LICENSE): update copyright year --- [core]/esx_context/LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/esx_context/LICENSE b/[core]/esx_context/LICENSE index 4b046bd2..f2c6706f 100644 --- a/[core]/esx_context/LICENSE +++ b/[core]/esx_context/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_boat - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_boat Copyright (C) 2015-2023 Jérémie N'gadi + esx_boat Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 9cf8ed13f4cd33a5ea6d7501248b69f32cf287c4 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:38:46 +0100 Subject: [PATCH 19/57] chore(LICENSE): update copyright year --- [core]/esx_identity/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_identity/LICENSE b/[core]/esx_identity/LICENSE index 4dc529f0..e57012ae 100644 --- a/[core]/esx_identity/LICENSE +++ b/[core]/esx_identity/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_identity - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_identity Copyright (C) 2015-2023 Jérémie N'gadi + esx_identity Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 2d7757a656fc6c352e32c4230074536ad69df64c Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:39:17 +0100 Subject: [PATCH 20/57] chore(LICENSE): update copyright year --- [core]/esx_loadingscreen/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_loadingscreen/LICENSE b/[core]/esx_loadingscreen/LICENSE index 85ce0959..8eef124b 100644 --- a/[core]/esx_loadingscreen/LICENSE +++ b/[core]/esx_loadingscreen/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_default - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From a1de341c0c42b0073dfa077ef7094de659a1c29f Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:39:44 +0100 Subject: [PATCH 21/57] Update LICENSE --- [core]/esx_menu_default/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_menu_default/LICENSE b/[core]/esx_menu_default/LICENSE index 85ce0959..8eef124b 100644 --- a/[core]/esx_menu_default/LICENSE +++ b/[core]/esx_menu_default/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_default - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 1d694be8d3eb6b8657439e396f23baedacac3f02 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:40:06 +0100 Subject: [PATCH 22/57] chore(LICENSE): update copyright year --- [core]/esx_menu_dialog/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_menu_dialog/LICENSE b/[core]/esx_menu_dialog/LICENSE index 2a78c4ae..7b3fd1a9 100644 --- a/[core]/esx_menu_dialog/LICENSE +++ b/[core]/esx_menu_dialog/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_dialog - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_dialog Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_dialog Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 6db87ebf1abc301c0b1807472744830f5db98dc9 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:40:23 +0100 Subject: [PATCH 23/57] chore(LICENSE): update copyright year --- [core]/esx_menu_list/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_menu_list/LICENSE b/[core]/esx_menu_list/LICENSE index 4b6f6d2e..b56c9231 100644 --- a/[core]/esx_menu_list/LICENSE +++ b/[core]/esx_menu_list/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_list - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_list Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_list Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 3c7a6c94ddb928b2beb05b7ae97bb899a0911a3a Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:49:28 +0100 Subject: [PATCH 24/57] chore(LICENSE): update copyright year --- [core]/esx_notify/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_notify/LICENSE b/[core]/esx_notify/LICENSE index 85ce0959..8eef124b 100644 --- a/[core]/esx_notify/LICENSE +++ b/[core]/esx_notify/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_default - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 8d99b5934f8f88dce9ed1e84a6544f78e19cf137 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:50:05 +0100 Subject: [PATCH 25/57] chore(LICENSE): update copyright year --- [core]/esx_skin/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_skin/LICENSE b/[core]/esx_skin/LICENSE index f8a9de97..78332fdb 100644 --- a/[core]/esx_skin/LICENSE +++ b/[core]/esx_skin/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_skin - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_skin Copyright (C) 2015-2023 Jérémie N'gadi + esx_skin Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 62b2c7a21195271abbfdf6ee1d90630d833b61ae Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:50:20 +0100 Subject: [PATCH 26/57] chore(LICENSE): update copyright year --- [core]/esx_textui/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_textui/LICENSE b/[core]/esx_textui/LICENSE index 85ce0959..8eef124b 100644 --- a/[core]/esx_textui/LICENSE +++ b/[core]/esx_textui/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx_menu_default - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2023 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From db1164decc4e16635f4bdc790303a0fdbd4cb577 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:50:37 +0100 Subject: [PATCH 27/57] chore(LICENSE): update copyright year --- [core]/skinchanger/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/skinchanger/LICENSE b/[core]/skinchanger/LICENSE index 79cea11b..89a184fc 100644 --- a/[core]/skinchanger/LICENSE +++ b/[core]/skinchanger/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. skinchanger - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - skinchanger Copyright (C) 2015-2023 Jérémie N'gadi + skinchanger Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. \ No newline at end of file +. From 69a49723ec88d1b8862780a5cb07cdd69c7b5a0c Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:50:55 +0100 Subject: [PATCH 28/57] chore(LICENSE): update copyright year --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 6977f644..595810b9 100644 --- a/LICENSE +++ b/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. esx-legacy - Copyright (C) 2015-2023 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx-legacy Copyright (C) 2015-2023 Jérémie N'gadi + esx-legacy Copyright (C) 2015-2024 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 49e93b03989e7ba800bb6d99ee19c6e41e39e37d Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:46:38 +0100 Subject: [PATCH 29/57] chore(LICENSE) --- [core]/esx_context/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_context/LICENSE b/[core]/esx_context/LICENSE index f2c6706f..dae70ee4 100644 --- a/[core]/esx_context/LICENSE +++ b/[core]/esx_context/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - esx_boat - Copyright (C) 2015-2024 Jérémie N'gadi + esx_context + Copyright (C) 2022-2024 ESX Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_boat Copyright (C) 2015-2024 Jérémie N'gadi + esx_context Copyright (C) 2022-2024 ESX Framework This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From ca6daacd90ee7769cb00b0e9b695665375b56db6 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:49:30 +0100 Subject: [PATCH 30/57] chore(LICENSE) --- [core]/esx_loadingscreen/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_loadingscreen/LICENSE b/[core]/esx_loadingscreen/LICENSE index 8eef124b..79832f23 100644 --- a/[core]/esx_loadingscreen/LICENSE +++ b/[core]/esx_loadingscreen/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - esx_menu_default - Copyright (C) 2015-2024 Jérémie N'gadi + esx_loadingscreen + Copyright (C) 2020-2024 ESX Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi + esx_loadingscreen Copyright (C) 2020-2024 ESX Framework This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 715eab277472b72d0820c38fbb8015ad012f0a40 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:50:37 +0100 Subject: [PATCH 31/57] chore(readme) --- [core]/esx_multicharacter/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_multicharacter/readme.md b/[core]/esx_multicharacter/readme.md index 75e9cdf6..58b30ff4 100644 --- a/[core]/esx_multicharacter/readme.md +++ b/[core]/esx_multicharacter/readme.md @@ -21,7 +21,7 @@ A Simplistic system, that allows Players to have multiple Characters, which can Official Multi-Character system for ESX Legacy -Copyright © 2022-2023 Linden, ESX-Framework and KASH +Copyright © 2022-2024 Linden, ESX-Framework and KASH This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by From e725c084073f2f1cf2ad16b19571cfdabce7cfbd Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:51:36 +0100 Subject: [PATCH 32/57] chore(LICENSE) --- [core]/esx_multicharacter/LICENSE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_multicharacter/LICENSE.md b/[core]/esx_multicharacter/LICENSE.md index f288702d..e23434ea 100644 --- a/[core]/esx_multicharacter/LICENSE.md +++ b/[core]/esx_multicharacter/LICENSE.md @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) + esx_multicharacter + Copyright (C) 2022-2024 ESX Framework, Linden, KASH This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + esx_multicharacter Copyright (C) 2022-2024 ESX Framework, Linden, KASH This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 5db36e55ee939a65d78d12927238a2dddea09d7c Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:52:21 +0100 Subject: [PATCH 33/57] chore(readme) --- [core]/esx_notify/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_notify/readme.md b/[core]/esx_notify/readme.md index 9f00c0de..666b3498 100644 --- a/[core]/esx_notify/readme.md +++ b/[core]/esx_notify/readme.md @@ -55,7 +55,7 @@ ESX.ShowNotification("I i ~r~love~s~ donuts", "success", 3000) esx_notify- Notify! -Copyright (C) 2023 ESX-Framework +Copyright (C) 2022-2024 ESX-Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. From 099dd993f90ee89ecbde2785ad452a98c5582c0a Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:53:04 +0100 Subject: [PATCH 34/57] chore(LICENSE) --- [core]/esx_notify/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_notify/LICENSE b/[core]/esx_notify/LICENSE index 8eef124b..a7568793 100644 --- a/[core]/esx_notify/LICENSE +++ b/[core]/esx_notify/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - esx_menu_default - Copyright (C) 2015-2024 Jérémie N'gadi + esx_notify + Copyright (C) 2022-2024 ESX Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi + esx_notify Copyright (C) 2022-2024 ESX Framework This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From a7eb94ffac1f6e31e36d950a35054dfa61c3e2ab Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:54:28 +0100 Subject: [PATCH 35/57] chore(readme) --- [core]/esx_textui/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/esx_textui/readme.md b/[core]/esx_textui/readme.md index 2c1f30e9..32796da3 100644 --- a/[core]/esx_textui/readme.md +++ b/[core]/esx_textui/readme.md @@ -41,9 +41,9 @@ ESX.TextUI("i ~r~love~s~ donuts", "error") ## Legal -esx_textui - Persistant Notifications! +esx_textui - Persistent Notifications -Copyright (C) 2023 ESX-Framework +Copyright (C) 2022-2024 ESX Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. From e481f38ebf09951ee44970393c62f8e31b7ebc54 Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:55:09 +0100 Subject: [PATCH 36/57] chore(LICENSE) --- [core]/esx_textui/LICENSE | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_textui/LICENSE b/[core]/esx_textui/LICENSE index 8eef124b..cf001768 100644 --- a/[core]/esx_textui/LICENSE +++ b/[core]/esx_textui/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - esx_menu_default - Copyright (C) 2015-2024 Jérémie N'gadi + esx_textui + Copyright (C) 2015-2024 ESX Framework This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi + esx_textui Copyright (C) 2022-2024 ESX Framework This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From d8e41e1bcf2e79f41f9a4ba045d0eb02eb861ace Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:56:41 +0100 Subject: [PATCH 37/57] chore(readme) --- [core]/esx_context/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_context/README.md b/[core]/esx_context/README.md index 97da2c83..c4e378a9 100644 --- a/[core]/esx_context/README.md +++ b/[core]/esx_context/README.md @@ -6,7 +6,7 @@ A elegant, easy to use Context Menu system to make User Interactions clean and h esx_context -Copyright (C) ESX-Framework +Copyright (C) 2022-2024 ESX Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. From 5523c8b6bec96ce816c457630f916f031979f48d Mon Sep 17 00:00:00 2001 From: Thekuca <63980591+Thekuca@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:57:02 +0100 Subject: [PATCH 38/57] chore(readme) --- [core]/esx_loadingscreen/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_loadingscreen/README.md b/[core]/esx_loadingscreen/README.md index 57b3f585..1f51ae3e 100644 --- a/[core]/esx_loadingscreen/README.md +++ b/[core]/esx_loadingscreen/README.md @@ -6,7 +6,7 @@ A simple but beautiful Loading Screen for your server! esx_loadingscreen - Loading in style! -Copyright (C) 2023 ESX-Framework +Copyright (C) 2020-2024 ESX Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. From 5acadc7e984ea7a2675f355b14bd2f02526a6cfd Mon Sep 17 00:00:00 2001 From: Matthias <102318489+itsmaty@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:29:48 +0100 Subject: [PATCH 39/57] tweak(core/client/functions): change snake_case to lowerCamelCase --- [core]/es_extended/client/functions.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 4080b1d8..bc72bac6 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -508,9 +508,9 @@ function ESX.Game.GetClosestEntity(entities, isPlayerEntities, coords, modelFilt if modelFilter then filteredEntities = {} - for current_entity_index = 1, #entities do - if modelFilter[GetEntityModel(entities[current_entity_index])] then - filteredEntities[#filteredEntities + 1] = entities[current_entity_index] + for currentEntityIndex = 1, #entities do + if modelFilter[GetEntityModel(entities[currentEntityIndex])] then + filteredEntities[#filteredEntities + 1] = entities[currentEntityIndex] end end end @@ -1128,8 +1128,8 @@ function ESX.ShowInventory() { unselectable = true, icon = "fas fa-users", title = "Nearby Players" }, } - for current_nearby_player_index = 1, #playersNearby do - players[GetPlayerServerId(playersNearby[current_nearby_player_index])] = true + for currentNearbyPlayerIndex = 1, #playersNearby do + players[GetPlayerServerId(playersNearby[currentNearbyPlayerIndex])] = true end ESX.TriggerServerCallback("esx:getPlayerNames", function(returnedPlayers) From 5fbbe8e29d5c171ff2618168b15e5434caf54f66 Mon Sep 17 00:00:00 2001 From: "Adam Volkman (maku)" <68100107+itIsMaku@users.noreply.github.com> Date: Thu, 28 Mar 2024 01:54:47 +0100 Subject: [PATCH 40/57] fix(multicharacter/config): predefined spawn with incorrent defined heading for script --- [core]/esx_multicharacter/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_multicharacter/config.lua b/[core]/esx_multicharacter/config.lua index 8e5267bf..9f6e0577 100644 --- a/[core]/esx_multicharacter/config.lua +++ b/[core]/esx_multicharacter/config.lua @@ -16,7 +16,7 @@ else -- Sets the location for the character selection scene -- To set the spawn location for new characters, modify the default value in the users SQL table Config.Spawn = { - { x = -284.2856, y = 562.4627, z = 172.9182, heading = 19.9895 }, + { x = -284.2856, y = 562.4627, z = 172.9182, w = 19.9895 }, } -------------------- From c85c2f57a287417621828c017cfa3ad197610145 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Thu, 4 Apr 2024 23:48:02 +0400 Subject: [PATCH 41/57] Added function ESX.TriggerClientEvent( --- [core]/es_extended/server/functions.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 38834ddc..840a2a52 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -4,6 +4,24 @@ function ESX.Trace(msg) end end +--- Triggers an event for one or more clients. +---@param eventName string The name of the event to trigger. +---@param playerIds table|number If a number, represents a single player ID. If a table, represents an array of player IDs. +---@param ... any Additional arguments to pass to the event handler. +function ESX.TriggerClientEvent(eventName, playerIds, ...) + if type(playerIds) == "number" then + TriggerClientEvent(eventName, playerIds, ...) + return + end + + local Payload = msgpack.pack_args(...) + local payloadLength = #Payload + + for i = 1, #playerIds do + TriggerClientEventInternal(eventName, playerIds[i], Payload, payloadLength) + end +end + function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion) if type(name) == "table" then for _, v in ipairs(name) do From 96321ee784bad93df0868f638576b6a450631819 Mon Sep 17 00:00:00 2001 From: Ilias Rbayti Date: Sun, 7 Apr 2024 04:38:36 +0200 Subject: [PATCH 42/57] fix variable capitalization --- [core]/es_extended/server/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 840a2a52..bd115f49 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -14,11 +14,11 @@ function ESX.TriggerClientEvent(eventName, playerIds, ...) return end - local Payload = msgpack.pack_args(...) - local payloadLength = #Payload + local payload = msgpack.pack_args(...) + local payloadLength = #payload for i = 1, #playerIds do - TriggerClientEventInternal(eventName, playerIds[i], Payload, payloadLength) + TriggerClientEventInternal(eventName, playerIds[i], payload, payloadLength) end end From bea5236eb9c294e81188358130015c5a98d718ca Mon Sep 17 00:00:00 2001 From: Tomson701 <47027631+tomson701@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:31:30 +0200 Subject: [PATCH 43/57] fix: ox_inventory setMaxWeight client-side sync --- [core]/es_extended/server/classes/overrides/oxinventory.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/overrides/oxinventory.lua b/[core]/es_extended/server/classes/overrides/oxinventory.lua index b6e9b53a..5c883707 100644 --- a/[core]/es_extended/server/classes/overrides/oxinventory.lua +++ b/[core]/es_extended/server/classes/overrides/oxinventory.lua @@ -140,7 +140,7 @@ Core.PlayerFunctionOverrides.OxInventory = { return function(newWeight) self.maxWeight = newWeight self.triggerEvent("esx:setMaxWeight", self.maxWeight) - return Inventory.Set(self.source, "maxWeight", newWeight) + return Inventory.SetMaxWeight(self.source, newWeight) end end, From 6d628ed6eb597fee870994e5be31ec16f8e6a7e0 Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Thu, 18 Apr 2024 21:36:38 +0200 Subject: [PATCH 44/57] refactor(es_extended): put identical object related code into one file + put common scripts in shared instead of same thing in client_scripts / server_scripts --- .../{client/common.lua => common/object.lua} | 16 ++++++++-------- [core]/es_extended/fxmanifest.lua | 8 +++----- [core]/es_extended/server/common.lua | 9 --------- 3 files changed, 11 insertions(+), 22 deletions(-) rename [core]/es_extended/{client/common.lua => common/object.lua} (97%) diff --git a/[core]/es_extended/client/common.lua b/[core]/es_extended/common/object.lua similarity index 97% rename from [core]/es_extended/client/common.lua rename to [core]/es_extended/common/object.lua index 2191d17a..bd8f8009 100644 --- a/[core]/es_extended/client/common.lua +++ b/[core]/es_extended/common/object.lua @@ -1,8 +1,8 @@ -exports("getSharedObject", function() - return ESX -end) - -AddEventHandler("esx:getSharedObject", function() - local Invoke = GetInvokingResource() - print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke)) -end) +exports("getSharedObject", function() + return ESX +end) + +AddEventHandler("esx:getSharedObject", function() + local Invoke = GetInvokingResource() + print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke)) +end) \ No newline at end of file diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index cac174a7..99fdb131 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -11,6 +11,9 @@ shared_scripts { 'config.lua', 'config.weapons.lua', + + 'common/modules/*.lua', + 'common/*.lua', } server_scripts { @@ -27,8 +30,6 @@ server_scripts { 'server/main.lua', 'server/commands.lua', - 'common/modules/*.lua', - 'common/functions.lua', 'server/modules/actions.lua', 'server/modules/npwd.lua' } @@ -41,9 +42,6 @@ client_scripts { 'client/main.lua', - 'common/modules/*.lua', - 'common/functions.lua', - 'common/functions.lua', 'client/modules/actions.lua', 'client/modules/death.lua', diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index 68bc94c9..f69f5838 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -18,15 +18,6 @@ RegisterNetEvent("esx:onPlayerSpawn", function() ESX.Players[source].spawned = true end) -AddEventHandler("esx:getSharedObject", function() - local Invoke = GetInvokingResource() - print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke)) -end) - -exports("getSharedObject", function() - return ESX -end) - if Config.OxInventory then Config.PlayerFunctionOverride = "OxInventory" SetConvarReplicated("inventory:framework", "esx") From bc1e5519af35ae690407210d4d65f66261d67f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=C4=87?= Date: Sat, 4 May 2024 19:49:33 +0200 Subject: [PATCH 45/57] feat(Player): implement `esx:setGroup` event --- [core]/es_extended/server/classes/player.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index ad3fd030..91dee8cf 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -127,9 +127,16 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, ---@param newGroup string ---@return void function self.setGroup(newGroup) + local lastGroup = self.group + _ExecuteCommand(("remove_principal identifier.%s group.%s"):format(self.license, self.group)) + self.group = newGroup + + _TriggerEvent("esx:setGroup", self.source, self.group, lastGroup) + self.triggerEvent("esx:setGroup", self.group, lastGroup) Player(self.source).state:set("group", self.group, true) + _ExecuteCommand(("add_principal identifier.%s group.%s"):format(self.license, self.group)) end @@ -475,7 +482,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, skin_female = gradeObject.skin_female and json.decode(gradeObject.skin_female) or {}, } - TriggerEvent("esx:setJob", self.source, self.job, lastJob) + _TriggerEvent("esx:setJob", self.source, self.job, lastJob) self.triggerEvent("esx:setJob", self.job, lastJob) Player(self.source).state:set("job", self.job, true) end From c612b5b259d3c1c33fbbf91732e02d91ae4538d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=C4=87?= Date: Sat, 4 May 2024 19:56:10 +0200 Subject: [PATCH 46/57] feat(Client): update playerdata on group update --- [core]/es_extended/client/main.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 476e4f99..06fea5a2 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -24,7 +24,7 @@ function ESX.SpawnPlayer(skin, coords, cb) p:resolve() end) Citizen.Await(p) - + local playerPed = PlayerPedId() FreezeEntityPosition(playerPed, true) SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true) @@ -56,7 +56,7 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin) while not DoesEntityExist(ESX.PlayerData.ped) do Wait(20) end - + ESX.PlayerLoaded = true local metadata = ESX.PlayerData.metadata @@ -72,7 +72,7 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin) local timer = GetGameTimer() while not HaveAllStreamingRequestsCompleted(ESX.PlayerData.ped) and (GetGameTimer() - timer) < 2000 do Wait(0) - end + end if Config.EnablePVP then SetCanAttackFriendly(ESX.PlayerData.ped, true, false) @@ -378,6 +378,11 @@ AddEventHandler("esx:setJob", function(Job) ESX.SetPlayerData("job", Job) end) +RegisterNetEvent("esx:setGroup") +AddEventHandler("esx:setGroup", function(group) + ESX.SetPlayerData("group", group) +end) + if not Config.OxInventory then RegisterNetEvent("esx:createPickup") AddEventHandler("esx:createPickup", function(pickupId, label, coords, itemType, name, components, tintIndex) From fbeea28607636cdba3b55b044d7c14db00f389a7 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sat, 18 May 2024 12:24:12 +0200 Subject: [PATCH 47/57] :wrench: fix and refactor ToggleVehicleStatus feature --- [core]/es_extended/client/modules/actions.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index 3d263b1f..a495c3a6 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -24,6 +24,11 @@ local function GetData(vehicle) return displayName, netId end +local function ToggleVehicleStatus(isInVehicle, seat) + ESX.SetPlayerData("vehicle", isInVehicle) + ESX.SetPlayerData("seat", seat) +end + CreateThread(function() while not ESX.PlayerLoaded do Wait(200) end while true do @@ -64,15 +69,13 @@ CreateThread(function() isEnteringVehicle = true TriggerEvent("esx:enteringVehicle", vehicle, plate, seat, netId) TriggerServerEvent("esx:enteringVehicle", plate, seat, netId) - ESX.SetPlayerData("vehicle", vehicle) - ESX.SetPlayerData("seat", seat) + ToggleVehicleStatus(vehicle, seat) elseif not DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not IsPedInAnyVehicle(playerPed, true) and isEnteringVehicle then -- vehicle entering aborted TriggerEvent("esx:enteringVehicleAborted") TriggerServerEvent("esx:enteringVehicleAborted") isEnteringVehicle = false - ESX.SetPlayerData("vehicle", false) - ESX.SetPlayerData("seat", false) + ToggleVehicleStatus(false, false) elseif IsPedInAnyVehicle(playerPed, false) then -- suddenly appeared in a vehicle, possible teleport isEnteringVehicle = false @@ -83,8 +86,7 @@ CreateThread(function() current.displayName, current.netId = GetData(current.vehicle) TriggerEvent("esx:enteredVehicle", current.vehicle, current.plate, current.seat, current.displayName, current.netId) TriggerServerEvent("esx:enteredVehicle", current.plate, current.seat, current.displayName, current.netId) - ESX.SetPlayerData("vehicle", vehicle) - ESX.SetPlayerData("seat", seat) + ToggleVehicleStatus(current.vehicle, current.seat) end elseif isInVehicle then if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then @@ -93,8 +95,7 @@ CreateThread(function() TriggerServerEvent("esx:exitedVehicle", current.plate, current.seat, current.displayName, current.netId) isInVehicle = false current = {} - ESX.SetPlayerData("vehicle", false) - ESX.SetPlayerData("seat", false) + ToggleVehicleStatus(false,false) end end Wait(200) From 40abb5550527a89ba30fed30f915c0613314a542 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sat, 18 May 2024 15:21:01 +0200 Subject: [PATCH 48/57] :package: Implemented new better createJob method --- [core]/es_extended/fxmanifest.lua | 3 +- [core]/es_extended/server/functions.lua | 31 ------ .../es_extended/server/modules/createJob.lua | 100 ++++++++++++++++++ 3 files changed, 102 insertions(+), 32 deletions(-) create mode 100644 [core]/es_extended/server/modules/createJob.lua diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index fe10450d..6e86e731 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -30,7 +30,8 @@ server_scripts { 'common/modules/*.lua', 'common/functions.lua', 'server/modules/actions.lua', - 'server/modules/npwd.lua' + 'server/modules/npwd.lua', + 'server/modules/createJob.lua' } client_scripts { diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 38834ddc..e4be7b30 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -406,37 +406,6 @@ function ESX.DiscordLogFields(name, title, color, fields) ) end ---- Create Job at Runtime ---- @param name string ---- @param label string ---- @param grades table -function ESX.CreateJob(name, label, grades) - if not name then - return print("[^3WARNING^7] missing argument `name(string)` while creating a job") - end - - if not label then - return print("[^3WARNING^7] missing argument `label(string)` while creating a job") - end - - if not grades or not next(grades) then - return print("[^3WARNING^7] missing argument `grades(table)` while creating a job!") - end - - local parameters = {} - local job = { name = name, label = label, grades = {} } - - for _, v in pairs(grades) do - job.grades[tostring(v.grade)] = { job_name = name, grade = v.grade, name = v.name, label = v.label, salary = v.salary, skin_male = v.skin_male or "{}", skin_female = v.skin_female or "{}" } - parameters[#parameters + 1] = { name, v.grade, v.name, v.label, v.salary, v.skin_male or "{}", v.skin_female or "{}" } - end - - MySQL.insert("INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)", { name, label }) - MySQL.prepare("INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)", parameters) - - ESX.Jobs[name] = job -end - function ESX.RefreshJobs() local Jobs = {} local jobs = MySQL.query.await("SELECT * FROM jobs") diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua new file mode 100644 index 00000000..535394bb --- /dev/null +++ b/[core]/es_extended/server/modules/createJob.lua @@ -0,0 +1,100 @@ + +local NOTIFY_TYPES = { + INFO = "^5[%s]^7-^6[INFO]^7 %s", + SUCCESS = "^5[%s]^7-^2[SUCCESS]^7 %s", + ERROR = "^5[%s]^7-^1[ERROR]^7 %s" +} + +local function doesJobAndGradesExist(name, grades) + local jobExists = false + for _, grade in ipairs(grades) do + if ESX.DoesJobExist(name, grade.grade) then + jobExists = true + break + end + end + + return jobExists +end + +local function generateTransactionQueries(name,grades) + local queries = {} + for _, grade in ipairs(grades) do + queries[#queries+1] = { + query = 'INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)', + values = {name, grade.grade, grade.name, grade.label, grade.salary, '{}', '{}'} + } + end + + return queries +end + +local function generateNewJobTable(name, label, grades) + local job = { name = name, label = label, grades = {} } + for _, v in pairs(grades) do + job.grades[tostring(v.grade)] = { job_name = name, grade = v.grade, name = v.name, label = v.label, salary = v.salary, skin_male = {}, skin_female = {} } + end + + return job +end + +local function notify(notifyType,resourceName,message,...) + local formattedMessage = string.format(message, ...) + + if not NOTIFY_TYPES[notifyType] then + return print(NOTIFY_TYPES.INFO:format(resourceName,formattedMessage)) + end + + return print(NOTIFY_TYPES[notifyType]:format(resourceName,formattedMessage)) +end + +--- Create Job at Runtime +--- @param name string +--- @param label string +--- @param grades table +function ESX.CreateJob(name, label, grades) + local currentResourceName = GetInvokingResource() + local success = false + + if not name or name == '' then + notify("ERROR",currentResourceName, 'Missing argument `name`') + return + end + if not label or label == '' then + notify("ERROR",currentResourceName, 'Missing argument `label`') + return + end + if not grades or not next(grades) then + notify("ERROR",currentResourceName, 'Missing argument `grades`') + return + end + + local currentJobExist = doesJobAndGradesExist(name, grades) + + if currentJobExist then + notify("ERROR",currentResourceName, 'Job or grades already exists: `%s`', name) + return + end + + MySQL.insert('INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)', {name, label}, function(jobId) + if not jobId == 0 then + notify("ERROR",currentResourceName, 'Failed to insert job: `%s`', name) + return + end + + local queries = generateTransactionQueries(name, grades) + + MySQL.transaction(queries, function(results) + success = results + if not results then + notify("ERROR",currentResourceName, 'Failed to insert one or more grades for job: `%s`', name) + return + end + + ESX.Jobs[name] = generateNewJobTable(name,label,grades) + notify("SUCCESS",currentResourceName, 'Job created successfully: `%s`', name) + end) + end) + + return success +end \ No newline at end of file From 257d3af110544e1cd57d42cc51544f905919caf4 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sat, 18 May 2024 17:09:56 +0200 Subject: [PATCH 49/57] :ambulance: fix job checker (Arctos) --- [core]/es_extended/server/modules/createJob.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua index 535394bb..aab40338 100644 --- a/[core]/es_extended/server/modules/createJob.lua +++ b/[core]/es_extended/server/modules/createJob.lua @@ -6,15 +6,17 @@ local NOTIFY_TYPES = { } local function doesJobAndGradesExist(name, grades) - local jobExists = false - for _, grade in ipairs(grades) do - if ESX.DoesJobExist(name, grade.grade) then - jobExists = true - break - end + if not ESX.Jobs[name] then + return false end - return jobExists + for _, grade in ipairs(grades) do + if not ESX.DoesJobExist(name, grade.grade) then + return false + end + end + + return true end local function generateTransactionQueries(name,grades) From a49ae63711c33ca23f5649520d7e0ba4302bcf1e Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sun, 19 May 2024 15:46:00 +0200 Subject: [PATCH 50/57] Apply suggestions from code review by zRxnx Co-authored-by: zRxnx --- [core]/esx_identity/locales/de.lua | 36 ++++++++++++------------ [core]/esx_multicharacter/locales/de.lua | 26 ++++++++--------- [core]/esx_skin/locales/de.lua | 8 +++--- [core]/skinchanger/locales/de.lua | 26 ++++++++--------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/[core]/esx_identity/locales/de.lua b/[core]/esx_identity/locales/de.lua index e7760183..4c6de824 100644 --- a/[core]/esx_identity/locales/de.lua +++ b/[core]/esx_identity/locales/de.lua @@ -1,38 +1,38 @@ Locales["de"] = { ["show_active_character"] = "Aktiven Charakter anzeigen", ["active_character"] = "Aktiver Charakter: %s", - ["error_active_character"] = "Beim Abrufen Ihrer Daten ist ein Fehler aufgetreten", + ["error_active_character"] = "Beim Abrufen deiner Daten ist ein Fehler aufgetreten", ["delete_character"] = "Lösche deinen aktuellen Charakter.", ["deleted_character"] = "Charakter gelöscht", ["error_delete_character"] = "Es gab ein Problem beim löschen deines Charakters.", - ["thank_you_for_registering"] = "Registrierung erfolgreich. Enjoy!", - ["debug_xPlayer_get_first_name"] = "Gibt Ihren Vornamen zurück", - ["debug_xPlayer_get_last_name"] = "Gibt Ihren Nachnamen zurück", - ["debug_xPlayer_get_full_name"] = "Gibt Ihren vollständigen Namen zurück", + ["thank_you_for_registering"] = "Registrierung erfolgreich.", + ["debug_xPlayer_get_first_name"] = "Gibt deinen Vornamen zurück", + ["debug_xPlayer_get_last_name"] = "Gibt deinen Nachnamen zurück", + ["debug_xPlayer_get_full_name"] = "Gibt deinen vollständigen Namen zurück", ["debug_xPlayer_get_sex"] = "Gibt dein Geschlecht zurück", ["debug_xPlayer_get_dob"] = "Gibt dein Geburtsdatum zurück", - ["debug_xPlayer_get_height"] = "Gibt deine Größe zurück", + ["debug_xPlayer_get_height"] = "Gibt deine Körpergröße zurück", ["error_debug_xPlayer_get_first_name"] = "Es gab ein Problem beim Abrufen deines Vornamens.", - ["error_debug_xPlayer_get_last_name"] = "Es gab ein Problem beim Ermitteln deines Nachnamens.", + ["error_debug_xPlayer_get_last_name"] = "Es gab ein Problem beim Abrufen deines Nachnamens.", ["error_debug_xPlayer_get_full_name"] = "Es gab ein Problem beim Abrufen deines vollständigen Namens.", - ["error_debug_xPlayer_get_sex"] = "Es gab ein Problem bei der Ermittlung deines Geschlechts.", - ["error_debug_xPlayer_get_dob"] = "Es gab ein Problem bei der Ermittlung deines Geburtsdatums.", - ["error_debug_xPlayer_get_height"] = "Es gab ein Problem bei der Ermittlung Ihrer Größe.", + ["error_debug_xPlayer_get_sex"] = "Es gab ein Problem beim Abrufen deines Geschlechts.", + ["error_debug_xPlayer_get_dob"] = "Es gab ein Problem beim Abrufen deines Geburtsdatums.", + ["error_debug_xPlayer_get_height"] = "Es gab ein Problem beim Abrufen deiner Körpergröße.", ["return_debug_xPlayer_get_first_name"] = "Vorname: %s", ["return_debug_xPlayer_get_last_name"] = "Nachname: %s", ["return_debug_xPlayer_get_full_name"] = "Name: %s", ["return_debug_xPlayer_get_sex"] = "Geschlecht: %s", - ["return_debug_xPlayer_get_dob"] = "Geburtstag: %s", - ["return_debug_xPlayer_get_height"] = "Größe: %s CM", + ["return_debug_xPlayer_get_dob"] = "Geburtsdatum: %s", + ["return_debug_xPlayer_get_height"] = "Größe: %s cm", ["data_incorrect"] = "Ungültige Daten, bitte versuche es erneut", ["invalid_format"] = "Ungültiges Datenformat, bitte versuche es erneut.", - ["no_identifier"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identifier-missing\n\nDies wird dadurch verursacht, dass dein Bezeichner fehlt. Bitte komme später wieder oder melde dieses Problem dem Support.", - ["missing_identity"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identity-missing\n\nEs scheint, dass deine Identität fehlt, versuche erneut, eine Verbindung herzustellen.", - ["deleted_identity"] = "Charakter gelöscht. Bitte verbindedich erneut, um einen neuen Charakter zu erstellen.", + ["no_identifier"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identifier-missing\n\nDies wird dadurch verursacht, dass deine R* ID fehlt. Bitte versuche es erneut oder melde dieses Problem dem Support.", + ["missing_identity"] = "Es gab ein Problem beim Laden deines Charakters!\nFehlercode: identifier-missing\n\nDies wird dadurch verursacht, dass deine R* ID fehlt. Bitte versuche es erneut oder melde dieses Problem dem Support.", + ["deleted_identity"] = "Charakter gelöscht. Bitte verbinde dich erneut, um einen neuen Charakter zu erstellen.", ["already_registered"] = "Du hast dich bereits registriert.", ["invalid_firstname_format"] = "Ungültiges Format (Vorname): Bitte versuche es erneut.", - ["invalid_lastname_format"] = "Ungültiges Format (Nachname): Bitte versuche es noch einmal.", - ["invalid_dob_format"] = "Ungültiges Format (Geburtstag): Bitte versuche es noch einmal.", + ["invalid_lastname_format"] = "Ungültiges Format (Nachname): Bitte versuche es erneut.", + ["invalid_dob_format"] = "Ungültiges Format (Geburtstag): Bitte versuche es erneut.", ["invalid_sex_format"] = "Ungültiges Format (Geschlecht): Bitte versuche es erneut.", - ["invalid_height_format"] = "Ungültiges Format (Größe): Bitte versuche es erneut.", + ["invalid_height_format"] = "Ungültiges Format (Körpergröße): Bitte versuche es erneut.", } \ No newline at end of file diff --git a/[core]/esx_multicharacter/locales/de.lua b/[core]/esx_multicharacter/locales/de.lua index 17c004fe..f33c433e 100644 --- a/[core]/esx_multicharacter/locales/de.lua +++ b/[core]/esx_multicharacter/locales/de.lua @@ -1,31 +1,31 @@ Locales["de"] = { - [" male"] = "Männlich", - [" female"] = "Weiblich", - ["select_char"] = "Charakter Auswählen", - ["select_char_description"] = "Wähle einen Charakter aus, als den du spielen willst.", + ["male"] = "Männlich", + ["female"] = "Weiblich", + ["select_char"] = "Charakter auswählen", + ["select_char_description"] = "Wähle einen Charakter aus, mit den du spielen willst.", ["create_char"] = "Neuer Charakter", ["char_play"] = "Spielen", ["char_play_description"] = "Weiter in die Stadt.", ["char_disabled"] = "Deaktiviert", - ["char_disabled_description"] = "Dieser Charakter ist unbrauchbar.", + ["char_disabled_description"] = "Dieser Charakter ist deaktiviert.", ["char_delete"] = "Löschen", ["char_delete_description"] = "Dieser Charakter wird dauerhaft entfernt.", - ["char_delete_confirmation"] = "Löschbestätigung", + ["char_delete_confirmation"] = "Bestätigung zur Entfernung deines Charakters.", ["char_delete_confirmation_description"] = "Bist du sicher, dass du den ausgewählten Charakter entfernen willst?", ["char_delete_yes_description"] = "Ja, ich bin sicher, dass ich den ausgewählten Charakter lösche", ["char_delete_no_description"] = "Nein, zurück zu den Charakteroptionen", ["character"] = " Charakter: %s", ["return"] = "Zurück", ["return_description"] = "Zur Charakterauswahl zurückkehren.", - ["command_setslots"] = "Anzahl der Multicharakter-Slots eines Spielers festlegen", - ["command_remslots"] = "Die Anzahl der Multicharakter-Slots eines Spielers entfernen", + ["command_setslots"] = "Anzahl der Charakter-Slots eines Spielers festlegen", + ["command_remslots"] = "Die Anzahl der Charakter-Slots eines Spielers entfernen", ["command_enablechar"] = "Aktiviere einen bestimmten Charakter eines Spielers", - ["command_disablechar"] = "Einen bestimmten Charakter eines Spielers deaktivieren", + ["command_disablechar"] = "Deaktiviere einen bestimmten Charakter eines Spielers", ["command_charslot"] = "Slotnummer des Charakters", - ["command_identifier"] = "Spieler-Identifikator", - ["command_slots"] = "# of slots", - ["slotsadd"] = "Du hast %s Slots auf %s gesetzt", - ["slotsrem"] = "Du hast Slots auf %s entfernt", + ["command_identifier"] = "Spieler R* ID", + ["command_slots"] = "Anzahl von Charakter-Slots", + ["slotsadd"] = "Du hast %s Charakter-Slots auf %s gesetzt", + ["slotsrem"] = "Du hast &s Charakter-Slots auf %s entfernt", ["charenabled"] = "Du hast den Charakter #%s von %s aktiviert", ["chardisabled"] = "Du hast den Charakter #%s von %s deaktiviert", ["charnotfound"] = "Charakter #%s von %s existiert nicht", diff --git a/[core]/esx_skin/locales/de.lua b/[core]/esx_skin/locales/de.lua index 4d6b27fb..b40caa1d 100644 --- a/[core]/esx_skin/locales/de.lua +++ b/[core]/esx_skin/locales/de.lua @@ -1,6 +1,6 @@ Locales["de"] = { - ["skin_menu"] = "Skin Menu", - ["use_rotate_view"] = "Verwende ~INPUT_FRONTEND_LS~ und ~INPUT_CHARACTER_WHEEL~, um die Ansicht zu drehen.", - ["skin"] = "Skin ändern", - ["saveskin"] = "Skin in einer Datei speichern", + ["skin_menu"] = "Skin Menü", + ["use_rotate_view"] = "Drücke ~INPUT_FRONTEND_LS~ oder ~INPUT_CHARACTER_WHEEL~ um deine Ansicht zu ändern.", + ["skin"] = "Aussehen ändern", + ["saveskin"] = "Aussehen abspeichern", } \ No newline at end of file diff --git a/[core]/skinchanger/locales/de.lua b/[core]/skinchanger/locales/de.lua index 7bea236c..d50b19d2 100644 --- a/[core]/skinchanger/locales/de.lua +++ b/[core]/skinchanger/locales/de.lua @@ -13,7 +13,7 @@ Locales["de"] = { ["cheeks_1"] = "Wangenknochenhöhe", ["cheeks_2"] = "Wangenknochenbreite", ["cheeks_3"] = "Wangenbreite", - ["lip_fullness"] = "Lippenfülle", + ["lip_fullness"] = "Lippendicke", ["jaw_bone_width"] = "Kieferknochenbreite", ["jaw_bone_length"] = "Kieferknochenlänge", ["chin_height"] = "Kinnhöhe", @@ -27,8 +27,8 @@ Locales["de"] = { ["beard_size"] = "Bartgröße", ["beard_color_1"] = "Bartfarbe 1", ["beard_color_2"] = "Bartfarbe 2", - ["hair_1"] = "Haar 1", - ["hair_2"] = "Haar 2", + ["hair_1"] = "Haare 1", + ["hair_2"] = "Haare 2", ["hair_color_1"] = "Haarfarbe 1", ["hair_color_2"] = "Haarfarbe 2", ["eye_color"] = "Augenfarbe", @@ -40,7 +40,7 @@ Locales["de"] = { ["eyebrow_depth"] = "Augenbrauentiefe", ["eyebrow_height"] = "Augenbrauenhöhe", ["makeup_type"] = "Makeup-Typ", - ["makeup_thickness"] = "Makeup-Dicke", + ["makeup_thickness"] = "Makeupstärke", ["makeup_color_1"] = "Schminkfarbe 1", ["makeup_color_2"] = "Schminkfarbe 2", ["lipstick_type"] = "Lippenstifttyp", @@ -55,7 +55,7 @@ Locales["de"] = { ["torso_2"] = "Oberkörper 2", ["decals_1"] = "Abziehbilder 1", ["decals_2"] = "Abziehbilder 2", - ["arms"] = "Arme", + ["arms"] = "Arme 1", ["arms_2"] = "Arme 2", ["pants_1"] = "Hose 1", ["pants_2"] = "Hose 2", @@ -78,23 +78,23 @@ Locales["de"] = { ["bag"] = "Tasche", ["bag_color"] = "Taschenfarbe", ["blemishes"] = "Schönheitsfehler", - ["blemishes_size"] = "Flecken-Dicke", + ["blemishes_size"] = "Fleckenstärke", ["ageing"] = "Alterung", - ["ageing_1"] = "Alterungsdicke", + ["ageing_1"] = "Alterungsstärke", ["blush"] = "Erröten", - ["blush_1"] = "Rouge-Dicke", + ["blush_1"] = "Errötungsstärke", ["blush_color"] = "Errötungsfarbe", ["complexion"] = "Teint", ["complexion_1"] = "Teintstärke", ["sun"] = "Sonne", ["sun_1"] = "Sonnenstärke", ["sommersprossen"] = "Sommersprossen", - ["sommersprossen_1"] = "Sommersprossen Stärke", + ["sommersprossen_1"] = "Sommersprossenstärke", ["chest_hair"] = "Brusthaar", - ["chest_hair_1"] = "Brusthaardicke", + ["chest_hair_1"] = "Brusthaarstärke", ["chest_color"] = "Brusthaarfarbe", ["bodyb"] = "Körpermakel", - ["bodyb_size"] = "Körpermakel-Dicke", - ["bodyb_extra"] = "Körperflecken-Effekt", - ["bodyb_extra_thickness"] = "Flecken Körper Effekt Dicke", + ["bodyb_size"] = "Körpermakelstärke", + ["bodyb_extra"] = "Körperfleckeneffekt", + ["bodyb_extra_thickness"] = "Körperfleckeneffektstärke", } From e9a53c6c2170760b06b5018c496b32965ddc84cf Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sun, 19 May 2024 20:07:16 +0200 Subject: [PATCH 51/57] :ambulance: Fix random default spawn coords --- [core]/es_extended/common/modules/math.lua | 6 ++++++ [core]/es_extended/server/main.lua | 2 +- [core]/esx_multicharacter/client/main.lua | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/common/modules/math.lua b/[core]/es_extended/common/modules/math.lua index 9910d17e..868773b6 100644 --- a/[core]/es_extended/common/modules/math.lua +++ b/[core]/es_extended/common/modules/math.lua @@ -23,3 +23,9 @@ function ESX.Math.Trim(value) return nil end end + +function ESX.Math.Random(minRange, maxRange) + math.randomseed(GetGameTimer()) + return math.random(minRange or 1, maxRange or 10) +end + diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index e268ec80..092bd8f2 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -239,7 +239,7 @@ function loadESXPlayer(identifier, playerId, isNew) end -- Position - userData.coords = json.decode(result.position) or Config.DefaultSpawns[math.random(#Config.DefaultSpawns)] + userData.coords = json.decode(result.position) or Config.DefaultSpawns[ESX.Math.Random(1,#Config.DefaultSpawns)] -- Skin userData.skin = (result.skin and result.skin ~= "") and json.decode(result.skin) or { sex = userData.sex == "f" and 1 or 0 } diff --git a/[core]/esx_multicharacter/client/main.lua b/[core]/esx_multicharacter/client/main.lua index 556ccfe3..16f9a0ed 100644 --- a/[core]/esx_multicharacter/client/main.lua +++ b/[core]/esx_multicharacter/client/main.lua @@ -1,7 +1,7 @@ local mp_m_freemode_01 = `mp_m_freemode_01` local mp_f_freemode_01 = `mp_f_freemode_01` -local SpawnCoords = Config.Spawn[math.random(#Config.Spawn)] +local SpawnCoords = Config.Spawn[ESX.Math.Random(1,#Config.Spawn)] if ESX.GetConfig().Multichar then CreateThread(function() From 93a4894ecc6a381b9b44fc6267fcfcb8181f698f Mon Sep 17 00:00:00 2001 From: KeeganAI <53181748+KeeganAI@users.noreply.github.com> Date: Sun, 26 May 2024 18:16:44 +0200 Subject: [PATCH 52/57] fix(es_extended/server/functions.lua): fixed mistyped variable --- [core]/es_extended/server/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 38834ddc..9bd5b87b 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -106,13 +106,13 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion) elseif v.type == "any" then newArgs[v.name] = args[k] elseif v.type == "merge" then - local lenght = 0 + local length = 0 for i = 1, k - 1 do - lenght = lenght + string.len(args[i]) + 1 + length = length + string.len(args[i]) + 1 end local merge = table.concat(args, " ") - newArgs[v.name] = string.sub(merge, lenght) + newArgs[v.name] = string.sub(merge, length) elseif v.type == "coordinate" then local coord = tonumber(args[k]:match("(-?%d+%.?%d*)")) if not coord then From f459cf06585e384c9b6695e4513617b2c313a08a Mon Sep 17 00:00:00 2001 From: Ethan <41381482+ethandudu@users.noreply.github.com> Date: Tue, 28 May 2024 21:06:50 +0200 Subject: [PATCH 53/57] fixed sql query main.lua Now the script can delete rows where the table name contains a special character like a - --- [core]/esx_multicharacter/server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/esx_multicharacter/server/main.lua b/[core]/esx_multicharacter/server/main.lua index 8a5f9b2b..eec85eb6 100644 --- a/[core]/esx_multicharacter/server/main.lua +++ b/[core]/esx_multicharacter/server/main.lua @@ -136,7 +136,7 @@ end) local function DeleteCharacter(source, charid) local identifier = ("%s%s:%s"):format(PREFIX, charid, GetIdentifier(source)) - local query = "DELETE FROM %s WHERE %s = ?" + local query = "DELETE FROM `%s` WHERE %s = ?" local queries = {} local count = 0 From 104e152fe6055e8bc1204fc47150bfa1e7ad5482 Mon Sep 17 00:00:00 2001 From: "Adam Volkman (maku)" Date: Sat, 1 Jun 2024 22:05:23 +0200 Subject: [PATCH 54/57] fix(esx_menu_default): jquery handling ids jquery can't handle colon and other characters (so there is issue when element is not found and menu does not work) when getting id element by #name, but document.getElementById can --- [core]/esx_menu_default/html/js/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/[core]/esx_menu_default/html/js/app.js b/[core]/esx_menu_default/html/js/app.js index 36b960d1..da6a906a 100644 --- a/[core]/esx_menu_default/html/js/app.js +++ b/[core]/esx_menu_default/html/js/app.js @@ -62,7 +62,7 @@ }); ESX_MENU.render(); - $("#menu_" + namespace + "_" + name) + $(document.getElementById("menu_" + namespace + "_" + name)) .find(".menu-item.selected")[0] .scrollIntoView(); }; @@ -121,7 +121,7 @@ } if (typeof focused != "undefined") { - $("#menu_" + focused.namespace + "_" + focused.name).show(); + $(document.getElementById("menu_" + focused.namespace + "_" + focused.name)).show(); } $(menuContainer).show(); @@ -231,7 +231,7 @@ ESX_MENU.change(focused.namespace, focused.name, elem); ESX_MENU.render(); - $("#menu_" + focused.namespace + "_" + focused.name) + $(document.getElementById("menu_" + focused.namespace + "_" + focused.name)) .find(".menu-item.selected")[0] .scrollIntoView(); } @@ -266,7 +266,7 @@ ESX_MENU.change(focused.namespace, focused.name, elem); ESX_MENU.render(); - $("#menu_" + focused.namespace + "_" + focused.name) + $(document.getElementById("menu_" + focused.namespace + "_" + focused.name)) .find(".menu-item.selected")[0] .scrollIntoView(); } @@ -302,7 +302,7 @@ break; } - $("#menu_" + focused.namespace + "_" + focused.name) + $(document.getElementById("menu_" + focused.namespace + "_" + focused.name)) .find(".menu-item.selected")[0] .scrollIntoView(); } @@ -341,7 +341,7 @@ break; } - $("#menu_" + focused.namespace + "_" + focused.name) + $(document.getElementById("menu_" + focused.namespace + "_" + focused.name)) .find(".menu-item.selected")[0] .scrollIntoView(); } From 9f82576e7e7acded5de42caf0d876fc47d5c6a73 Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sun, 16 Jun 2024 14:41:38 +0200 Subject: [PATCH 55/57] :wrench: Added manual run option to lint github action --- .github/workflows/lint.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2fb4d83b..0536c873 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,8 @@ name: Lint -on: [push, pull_request] +on: + push: + pull_request: + workflow_dispatch: jobs: lint: name: Lint Resource From 826bb6c8fb4320805a4f859009dec4e2a8d71b9e Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sun, 16 Jun 2024 14:47:29 +0200 Subject: [PATCH 56/57] :pencil2: Fix lint errors --- [core]/es_extended/imports.lua | 2 ++ [core]/es_extended/locale.lua | 1 + [core]/es_extended/server/main.lua | 12 +++++---- [core]/esx_context/main.lua | 4 +-- [core]/esx_multicharacter/client/main.lua | 30 +++++++++++------------ [core]/esx_skin/client/main.lua | 7 +++--- 6 files changed, 30 insertions(+), 26 deletions(-) diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index a81a71ef..ffb7d4bf 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -1,5 +1,7 @@ ESX = exports["es_extended"]:getSharedObject() +OnPlayerData = function (key, val, last) end + if not IsDuplicityVersion() then -- Only register this event for the client AddEventHandler("esx:setPlayerData", function(key, val, last) if GetInvokingResource() == "es_extended" then diff --git a/[core]/es_extended/locale.lua b/[core]/es_extended/locale.lua index 98a323db..f9a29e9b 100644 --- a/[core]/es_extended/locale.lua +++ b/[core]/es_extended/locale.lua @@ -25,4 +25,5 @@ function TranslateCap(str, ...) -- Translate string first char uppercase end _ = Translate +-- luacheck: ignore _U _U = TranslateCap diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index 092bd8f2..4862e7ff 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -164,7 +164,7 @@ function loadESXPlayer(identifier, playerId, isNew) job, grade = "unemployed", "0" end - jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade] + local jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade] userData.job = { id = jobObject.id, @@ -509,19 +509,21 @@ if not Config.OxInventory then if xPlayer.hasWeapon(itemName) then local _, weapon = xPlayer.getWeapon(itemName) local _, weaponObject = ESX.GetWeapon(itemName) - local components, pickupLabel = ESX.Table.Clone(weapon.components) + -- luacheck: ignore weaponPickupLabel + local weaponPickupLabel = "" + local components = ESX.Table.Clone(weapon.components) xPlayer.removeWeapon(itemName) if weaponObject.ammo and weapon.ammo > 0 then local ammoLabel = weaponObject.ammo.label - pickupLabel = ("%s [%s %s]"):format(weapon.label, weapon.ammo, ammoLabel) + weaponPickupLabel = ("%s [%s %s]"):format(weapon.label, weapon.ammo, ammoLabel) xPlayer.showNotification(TranslateCap("threw_weapon_ammo", weapon.label, weapon.ammo, ammoLabel)) else - pickupLabel = ("%s"):format(weapon.label) + weaponPickupLabel = ("%s"):format(weapon.label) xPlayer.showNotification(TranslateCap("threw_weapon", weapon.label)) end - ESX.CreatePickup("item_weapon", itemName, weapon.ammo, pickupLabel, playerId, components, weapon.tintIndex) + ESX.CreatePickup("item_weapon", itemName, weapon.ammo, weaponPickupLabel, playerId, components, weapon.tintIndex) end end end) diff --git a/[core]/esx_context/main.lua b/[core]/esx_context/main.lua index ebf6a253..16a6b446 100644 --- a/[core]/esx_context/main.lua +++ b/[core]/esx_context/main.lua @@ -12,11 +12,11 @@ function Post(fn, ...) end function Open(position, eles, onSelect, onClose, canClose) - local canClose = canClose == nil and true or canClose + local canCloseMenu = canClose == nil and true or canClose activeMenu = { position = position, eles = eles, - canClose = canClose, + canClose = canCloseMenu, onSelect = onSelect, onClose = onClose, } diff --git a/[core]/esx_multicharacter/client/main.lua b/[core]/esx_multicharacter/client/main.lua index 16f9a0ed..7771876d 100644 --- a/[core]/esx_multicharacter/client/main.lua +++ b/[core]/esx_multicharacter/client/main.lua @@ -21,7 +21,7 @@ if ESX.GetConfig().Multichar then end) local canRelog, cam, spawned = true, nil, nil - local Characters = {} + local Characters , hidePlayers = {} , false RegisterNetEvent("esx_multicharacter:SetupCharacters") AddEventHandler("esx_multicharacter:SetupCharacters", function() @@ -147,7 +147,7 @@ if ESX.GetConfig().Multichar then }) end - function CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, value) + 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 }, @@ -160,17 +160,17 @@ if ESX.GetConfig().Multichar then TriggerServerEvent("esx_multicharacter:DeleteCharacter", Action.value) spawned = false elseif Action.action == "return" then - CharacterOptions(Characters, slots, SelectedCharacter) + CharacterOptions(characters, slots, SelectedCharacter) end end, nil, false) end - function CharacterOptions(Characters, slots, SelectedCharacter) + 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("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" }, } - if not Characters[SelectedCharacter.value].disabled then + if not characters[SelectedCharacter.value].disabled then elements[3] = { title = TranslateCap("char_play"), description = TranslateCap("char_play_description"), icon = "fa-solid fa-play", action = "play", value = SelectedCharacter.value } else elements[3] = { title = TranslateCap("char_disabled"), value = SelectedCharacter.value, icon = "fa-solid fa-xmark", description = TranslateCap("char_disabled_description") } @@ -186,17 +186,17 @@ if ESX.GetConfig().Multichar then ESX.CloseContext() TriggerServerEvent("esx_multicharacter:CharacterChosen", Action.value, false) elseif Action.action == "delete" then - CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, Action.value) + CharacterDeleteConfirmation(characters, slots, SelectedCharacter, Action.value) elseif Action.action == "return" then - SelectCharacterMenu(Characters, slots) + SelectCharacterMenu(characters, slots) end end, nil, false) end - function SelectCharacterMenu(Characters, slots) - local Character = next(Characters) + function SelectCharacterMenu(characters, slots) + local Character = next(characters) local elements = { { title = TranslateCap("select_char"), icon = "fa-solid fa-users", description = TranslateCap("select_char_description"), unselectable = true } } - for k, v in pairs(Characters) do + for k, v in pairs(characters) do if not v.model and v.skin then if v.skin.model then v.model = v.skin.model @@ -210,7 +210,7 @@ if ESX.GetConfig().Multichar then SetupCharacter(Character) end local label = v.firstname .. " " .. v.lastname - if Characters[k].disabled then + if characters[k].disabled then elements[#elements + 1] = { title = label, icon = "fa-regular fa-user", value = v.id } else elements[#elements + 1] = { title = label, icon = "fa-regular fa-user", value = v.id } @@ -225,7 +225,7 @@ if ESX.GetConfig().Multichar then ESX.CloseContext() local GetSlot = function() for i = 1, slots do - if not Characters[i] then + if not characters[i] then return i end end @@ -240,7 +240,7 @@ if ESX.GetConfig().Multichar then action = "closeui", }) else - CharacterOptions(Characters, slots, SelectedCharacter) + CharacterOptions(characters, slots, SelectedCharacter) SetupCharacter(SelectedCharacter.value) local playerPed = PlayerPedId() SetPedAoBlobRendering(playerPed, true) @@ -359,6 +359,6 @@ if ESX.GetConfig().Multichar then canRelog = true end) end - end) + end,false) end end diff --git a/[core]/esx_skin/client/main.lua b/[core]/esx_skin/client/main.lua index 83485da9..243d30ec 100644 --- a/[core]/esx_skin/client/main.lua +++ b/[core]/esx_skin/client/main.lua @@ -90,7 +90,7 @@ function OpenMenu(submitCb, cancelCb, restrict) cancelCb(data, menu) end end, function(data, menu) - local skin, components, maxVals + local skin, tempMaxVals TriggerEvent("skinchanger:getSkin", function(getSkin) skin = getSkin @@ -105,14 +105,13 @@ function OpenMenu(submitCb, cancelCb, restrict) -- Update max values TriggerEvent("skinchanger:getData", function(comp, max) - components, maxVals = comp, max + tempMaxVals = max end) local newData = {} for i = 1, #elements, 1 do - newData = {} - newData.max = maxVals[elements[i].name] + newData.max = tempMaxVals[elements[i].name] if elements[i].textureof ~= nil and data.current.name == elements[i].textureof then newData.value = 0 From 9fcfc57d98560bebcb0dc5cf3f3cc0a7e703ffca Mon Sep 17 00:00:00 2001 From: Gellipapa Date: Sun, 16 Jun 2024 14:55:32 +0200 Subject: [PATCH 57/57] :pencil2: Fix lint errors --- [core]/es_extended/client/main.lua | 4 ++-- [core]/es_extended/client/modules/actions.lua | 4 ++-- [core]/es_extended/server/functions.lua | 2 +- [core]/es_extended/server/modules/createJob.lua | 6 +++--- [core]/skinchanger/locales/de.lua | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index eabd89be..27180dd7 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -278,9 +278,9 @@ AddStateBagChangeHandler("VehicleProperties", nil, function(bagName, _, value) local netId = bagName:gsub("entity:", "") local vehicle = NetToVeh(tonumber(netId)) - + ESX.Game.SetVehicleProperties(vehicle, value) -end) +end) RegisterNetEvent("esx:setAccountMoney") AddEventHandler("esx:setAccountMoney", function(account) diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index a495c3a6..401297d8 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -24,8 +24,8 @@ local function GetData(vehicle) return displayName, netId end -local function ToggleVehicleStatus(isInVehicle, seat) - ESX.SetPlayerData("vehicle", isInVehicle) +local function ToggleVehicleStatus(inVehicle, seat) + ESX.SetPlayerData("vehicle", inVehicle) ESX.SetPlayerData("seat", seat) end diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 0c9da3e2..dcf313d3 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -536,7 +536,7 @@ if not Config.OxInventory then end function ESX.DoesJobExist(job, grade) - return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false + return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false end function Core.IsPlayerAdmin(playerId) diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua index aab40338..e156fa11 100644 --- a/[core]/es_extended/server/modules/createJob.lua +++ b/[core]/es_extended/server/modules/createJob.lua @@ -6,7 +6,7 @@ local NOTIFY_TYPES = { } local function doesJobAndGradesExist(name, grades) - if not ESX.Jobs[name] then + if not ESX.Jobs[name] then return false end @@ -79,7 +79,7 @@ function ESX.CreateJob(name, label, grades) end MySQL.insert('INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)', {name, label}, function(jobId) - if not jobId == 0 then + if jobId == nil or jobId == 0 then notify("ERROR",currentResourceName, 'Failed to insert job: `%s`', name) return end @@ -99,4 +99,4 @@ function ESX.CreateJob(name, label, grades) end) return success -end \ No newline at end of file +end diff --git a/[core]/skinchanger/locales/de.lua b/[core]/skinchanger/locales/de.lua index d50b19d2..a4741a61 100644 --- a/[core]/skinchanger/locales/de.lua +++ b/[core]/skinchanger/locales/de.lua @@ -17,7 +17,7 @@ Locales["de"] = { ["jaw_bone_width"] = "Kieferknochenbreite", ["jaw_bone_length"] = "Kieferknochenlänge", ["chin_height"] = "Kinnhöhe", - ["chin_length"] = "Kinnlänge", + ["chin_length"] = "Kinnlänge", ["chin_width"] = "Kinnbreite", ["chin_hole"] = "Kinnlochgröße", ["neck_thickness"] = "Halsdicke",