mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-19 06:46:03 +01:00
Merge pull request #28 from Hakkodevelopment/main
Fixed export issues & updated database validation :D
This commit is contained in:
@@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
changeCharacterCommand = "changecharacter", -- this is the command to open the ui again and change your character.
|
changeCharacterCommand = "changecharacter", -- this is the command to open the ui again and change your character.
|
||||||
enableAppearance = false, -- you need to install fivem-appearance
|
enableAppearance = true, -- you need to install fivem-appearance
|
||||||
characterSelectionAopDisplay = false,
|
characterSelectionAopDisplay = true,
|
||||||
aop = function ()
|
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
|
||||||
return "AOP: " .. exports["SimpleHUD"]:getAOP() -- exports["ModernHUD"]:getAOP()
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- set your backgrounds, if you have more than 1 then it will randomly change everytime you open the ui.
|
-- set your backgrounds, if you have more than 1 then it will randomly change everytime you open the ui.
|
||||||
backgrounds = {
|
backgrounds = {
|
||||||
"https://i.imgur.com/E51ckFx.png", -- Credits: Fuzzman270#0270
|
"https://i.imgur.com/E51ckFx.png", -- Credits: Fuzzman270#0270
|
||||||
|
|||||||
@@ -73,9 +73,11 @@ function SetDisplay(bool, typeName, bg, characters)
|
|||||||
})
|
})
|
||||||
Wait(500)
|
Wait(500)
|
||||||
if config.characterSelectionAopDisplay then
|
if config.characterSelectionAopDisplay then
|
||||||
|
local AreaOfPlay = exports[config.aopResourceName]:getAOP()
|
||||||
|
--print(AreaOfPlay)
|
||||||
SendNUIMessage({
|
SendNUIMessage({
|
||||||
type = "aop",
|
type = "aop",
|
||||||
aop = config.aop()
|
aop = AreaOfPlay
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -93,9 +95,10 @@ function start(switch)
|
|||||||
SetEntityVisible(ped, false, 0)
|
SetEntityVisible(ped, false, 0)
|
||||||
end
|
end
|
||||||
if config.characterSelectionAopDisplay then
|
if config.characterSelectionAopDisplay then
|
||||||
|
local AreaOfPlay = exports[config.aopResourceName]:getAOP()
|
||||||
SendNUIMessage({
|
SendNUIMessage({
|
||||||
type = "aop",
|
type = "aop",
|
||||||
aop = config.aop()
|
aop = AreaOfPlay
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ $(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === "aop") {
|
if (item.type === "aop") {
|
||||||
$("#aop").text(item.aop);
|
$("#aop").text(`AOP: ${item.aop}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === "refresh") {
|
if (item.type === "refresh") {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ AddEventHandler("onResourceStart", function(resourceName)
|
|||||||
if (GetCurrentResourceName() ~= resourceName) then
|
if (GetCurrentResourceName() ~= resourceName) then
|
||||||
return
|
return
|
||||||
end
|
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!')
|
print('^4ND_Core ^0Database structure validated!')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user