7 Commits

Author SHA1 Message Date
Andy
544ad64779 Update fxmanifest.lua 2025-02-22 23:31:12 +01:00
Andy
43f690e356 Merge pull request #84 from ND-Framework/fix/duplicate-licenses
fix: duplicate character licenses
2025-02-22 23:29:46 +01:00
Andyyy7666
e883c4e64f fix: duplicate character licenses 2025-02-22 23:29:29 +01:00
Andy
5928d89edf Merge pull request #83 from NikartikTheBear/patch-1
fix(fxmanifest typo)
2025-02-16 02:20:21 +01:00
nikartik
9b846dc07e fix(typo) 2025-02-14 22:39:10 +01:00
Andyyy7666
baac4c75dd refactor(server/main): wait for oxmysql 2025-02-05 21:22:26 +01:00
Andyyy7666
fb708cc7e7 Update commands.lua 2025-01-19 18:08:20 +01:00
4 changed files with 20 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
author "Andyyy#7666" author "Andyyy#7666"
description "ND Framework Core" description "ND Framework Core"
version "2.3.0" version "2.3.2"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"
@@ -37,7 +37,7 @@ files {
"compatibility/**/locale.lua" "compatibility/**/locale.lua"
} }
dependenies { dependencies {
"ox_lib", "ox_lib",
"oxmysql" "oxmysql"
} }

View File

@@ -54,7 +54,7 @@ lib.addCommand("setmoney", {
duration = 10000 duration = 10000
}) })
if not source then return end if not source or source == 0 then return end
TriggerClientEvent("chat:addMessage", source, { TriggerClientEvent("chat:addMessage", source, {
color = {50, 100, 235}, color = {50, 100, 235},
multiline = true, multiline = true,
@@ -96,7 +96,7 @@ lib.addCommand("setjob", {
duration = 10000 duration = 10000
}) })
if not source then return end if not source or source == 0 then return end
TriggerClientEvent("chat:addMessage", source, { TriggerClientEvent("chat:addMessage", source, {
color = {50, 100, 235}, color = {50, 100, 235},
multiline = true, multiline = true,
@@ -155,7 +155,7 @@ lib.addCommand("setgroup", {
return return
end end
if not source then return end if not source or source == 0 then return end
TriggerClientEvent("chat:addMessage", source, { TriggerClientEvent("chat:addMessage", source, {
color = {50, 100, 235}, color = {50, 100, 235},
multiline = true, multiline = true,
@@ -206,7 +206,7 @@ lib.addCommand("pay", {
} }
} }
}, function(source, args, raw) }, function(source, args, raw)
if not source then return end if not source or source == 0 then return end
local player = NDCore.getPlayer(source) local player = NDCore.getPlayer(source)
local targetPlayer = NDCore.getPlayer(args.target) local targetPlayer = NDCore.getPlayer(args.target)

View File

@@ -160,7 +160,7 @@ AddEventHandler("onResourceStop", function(name)
end end
end) end)
SetTimeout(500, function() MySQL.ready(function()
NDCore.loadSQL({ NDCore.loadSQL({
"database/characters.sql", "database/characters.sql",
"database/vehicles.sql" "database/vehicles.sql"

View File

@@ -221,7 +221,19 @@ local function createCharacterTable(info)
} }
if licenses then if licenses then
local found = false
for i=1, #licenses do
if licenses[i].type == licenseType then
self.metadata.licenses[i] = license
found = true
break
end
end
if not found then
self.metadata.licenses[#licenses+1] = license self.metadata.licenses[#licenses+1] = license
end
else else
self.metadata.licenses = {license} self.metadata.licenses = {license}
end end