From da1ce4af37827d40226c699985799a2fe65b70e3 Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Thu, 11 Aug 2022 19:04:31 -0600 Subject: [PATCH 1/6] Fixed AOP Export issues --- ND_CharacterSelection/config.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ND_CharacterSelection/config.lua b/ND_CharacterSelection/config.lua index 1a33c16..a3f9640 100644 --- a/ND_CharacterSelection/config.lua +++ b/ND_CharacterSelection/config.lua @@ -2,12 +2,9 @@ config = { changeCharacterCommand = "changecharacter", -- this is the command to open the ui again and change your character. - enableAppearance = false, -- you need to install fivem-appearance - characterSelectionAopDisplay = false, - aop = function () - return "AOP: " .. exports["SimpleHUD"]:getAOP() -- exports["ModernHUD"]:getAOP() - end, - + enableAppearance = true, -- you need to install fivem-appearance + characterSelectionAopDisplay = true, + aop = "SimpleHUD", -- ModernHUD, SimpleHUD. If you're using a custom AOP system, put the resource name here and make sure it has the export getAOP -- set your backgrounds, if you have more than 1 then it will randomly change everytime you open the ui. backgrounds = { "https://i.imgur.com/E51ckFx.png", -- Credits: Fuzzman270#0270 @@ -53,4 +50,4 @@ config = { {x = 1194.71, y = -1474.14, z = 33.86, name = "Fire Station No7 (Los Santos)"} }, } -} \ No newline at end of file +} From e3904a3db2b8be19e2949d8c5acd2a72a6fe11a3 Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Thu, 11 Aug 2022 19:04:57 -0600 Subject: [PATCH 2/6] Fixed AOP Export issues --- ND_CharacterSelection/source/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ND_CharacterSelection/source/client.lua b/ND_CharacterSelection/source/client.lua index 0196c6b..04a7cf0 100644 --- a/ND_CharacterSelection/source/client.lua +++ b/ND_CharacterSelection/source/client.lua @@ -75,7 +75,7 @@ function SetDisplay(bool, typeName, bg, characters) if config.characterSelectionAopDisplay then SendNUIMessage({ type = "aop", - aop = config.aop() + aop = exports[config.aop]:getAOP() }) end end @@ -239,4 +239,4 @@ RegisterCommand(config.changeCharacterCommand, function() end, false) -- chat suggestions -TriggerEvent("chat:addSuggestion", "/" .. config.changeCharacterCommand, "Switch your framework character.") \ No newline at end of file +TriggerEvent("chat:addSuggestion", "/" .. config.changeCharacterCommand, "Switch your framework character.") From f84ed33faea1c304afc8bb7dc1bacb4769b3c923 Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:16:37 -0600 Subject: [PATCH 3/6] Fixed AOP Export Issues --- ND_CharacterSelection/source/client.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ND_CharacterSelection/source/client.lua b/ND_CharacterSelection/source/client.lua index 04a7cf0..01a4c16 100644 --- a/ND_CharacterSelection/source/client.lua +++ b/ND_CharacterSelection/source/client.lua @@ -73,9 +73,11 @@ function SetDisplay(bool, typeName, bg, characters) }) Wait(500) if config.characterSelectionAopDisplay then + local AreaOfPlay = exports[config.aopResourceName]:getAOP() + --print(AreaOfPlay) SendNUIMessage({ type = "aop", - aop = exports[config.aop]:getAOP() + aop = AreaOfPlay }) end end @@ -93,9 +95,10 @@ function start(switch) SetEntityVisible(ped, false, 0) end if config.characterSelectionAopDisplay then + local AreaOfPlay = exports[config.aopResourceName]:getAOP() SendNUIMessage({ type = "aop", - aop = config.aop() + aop = AreaOfPlay }) end end From e11ab905d30fd2a523b570d12a63140c52485783 Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:16:58 -0600 Subject: [PATCH 4/6] Fixed AOP Export Issues --- ND_CharacterSelection/source/ui/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ND_CharacterSelection/source/ui/script.js b/ND_CharacterSelection/source/ui/script.js index bd7250a..dfc0de3 100644 --- a/ND_CharacterSelection/source/ui/script.js +++ b/ND_CharacterSelection/source/ui/script.js @@ -100,7 +100,7 @@ $(function() { } if (item.type === "aop") { - $("#aop").text(item.aop); + $("#aop").text(`AOP: ${item.aop}`); } if (item.type === "refresh") { @@ -225,4 +225,4 @@ $(function() { $.post(`https://${GetParentResourceName()}/exitGame`); return; }); -}); \ No newline at end of file +}); From 2b8b5e6fb58a8bbffaf18175e995d18350a84f5b Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:17:31 -0600 Subject: [PATCH 5/6] Updated Database Validation --- ND_Core/server/events.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ND_Core/server/events.lua b/ND_Core/server/events.lua index ba55fce..11c74ca 100644 --- a/ND_Core/server/events.lua +++ b/ND_Core/server/events.lua @@ -34,7 +34,7 @@ AddEventHandler("onResourceStart", function(resourceName) if (GetCurrentResourceName() ~= resourceName) then return end - MySQL.query("CREATE TABLE IF NOT EXISTS characters ( `character_id` INT(10) NOT NULL AUTO_INCREMENT, `license` VARCHAR(200) NOT NULL DEFAULT '0', `first_name` VARCHAR(50) NULL DEFAULT NULL, `last_name` VARCHAR(50) NULL DEFAULT NULL, `dob` VARCHAR(50) NULL DEFAULT NULL, `gender` VARCHAR(50) NULL DEFAULT NULL, `twt` VARCHAR(50) NULL DEFAULT NULL, `job` VARCHAR(50) NULL DEFAULT NULL, `cash` INT(10) NULL DEFAULT '0', `bank` INT(10) NULL DEFAULT '0', PRIMARY KEY (`character_id`) USING BTREE);") + MySQL.query("CREATE TABLE IF NOT EXISTS characters ( `character_id` INT(10) NOT NULL AUTO_INCREMENT, `license` VARCHAR(200) NOT NULL DEFAULT '0', `first_name` VARCHAR(50) NULL DEFAULT NULL, `last_name` VARCHAR(50) NULL DEFAULT NULL, `dob` VARCHAR(50) NULL DEFAULT NULL, `gender` VARCHAR(50) NULL DEFAULT NULL,`twt` VARCHAR(50) NULL DEFAULT NULL, `job` VARCHAR(50) NULL DEFAULT NULL, `cash` INT(10) NULL DEFAULT '0', `bank` INT(10) NULL DEFAULT '0', `phone_number` VARCHAR(20) NULL DEFAULT NULL, `groups` LONGTEXT NULL DEFAULT '[]', `last_location` LONGTEXT NULL DEFAULT '[]', `clothing` LONGTEXT NULL DEFAULT '[]', PRIMARY KEY (`character_id`) USING BTREE);") print('^4ND_Core ^0Database structure validated!') end) @@ -88,4 +88,4 @@ end) RegisterNetEvent("ND:updateClothes", function(clothing) local player = source NDCore.Functions.UpdateClothes(NDCore.Players[player].id, clothing) -end) \ No newline at end of file +end) From ee491920df48fb546a0e1f618110847599c0861d Mon Sep 17 00:00:00 2001 From: HakkoDevelopment <67168651+Hakkodevelopment@users.noreply.github.com> Date: Fri, 12 Aug 2022 12:28:36 -0600 Subject: [PATCH 6/6] Fixed spelling error --- ND_CharacterSelection/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ND_CharacterSelection/config.lua b/ND_CharacterSelection/config.lua index a3f9640..a64b1bb 100644 --- a/ND_CharacterSelection/config.lua +++ b/ND_CharacterSelection/config.lua @@ -4,7 +4,7 @@ config = { changeCharacterCommand = "changecharacter", -- this is the command to open the ui again and change your character. enableAppearance = true, -- you need to install fivem-appearance characterSelectionAopDisplay = true, - aop = "SimpleHUD", -- ModernHUD, SimpleHUD. If you're using a custom AOP system, put the resource name here and make sure it has the export getAOP + aopResourceName = "SimpleHUD", -- ModernHUD, SimpleHUD. If you're using a custom AOP system, put the resource name here and make sure it has the export getAOP -- set your backgrounds, if you have more than 1 then it will randomly change everytime you open the ui. backgrounds = { "https://i.imgur.com/E51ckFx.png", -- Credits: Fuzzman270#0270