From ab877749a8bbb73375f0184320f82f9051b6285c Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Sat, 3 Dec 2022 08:09:33 +0100 Subject: [PATCH] refactor: client functions --- client/functions.lua | 11 +++++++++++ client/main.lua | 14 +------------- fxmanifest.lua | 1 + 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 client/functions.lua diff --git a/client/functions.lua b/client/functions.lua new file mode 100644 index 0000000..ae8d2f3 --- /dev/null +++ b/client/functions.lua @@ -0,0 +1,11 @@ +function GetCoreObject() + return NDCore +end + +function NDCore.Functions.GetSelectedCharacter() + return NDCore.SelectedCharacter +end + +function NDCore.Functions.GetCharacters() + return NDCore.Characters +end \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index 751bd23..56d2691 100644 --- a/client/main.lua +++ b/client/main.lua @@ -6,18 +6,6 @@ NDCore.Characters = {} NDCore.Functions = {} NDCore.Config = config -function GetCoreObject() - return NDCore -end - -function NDCore.Functions.GetSelectedCharacter() - return NDCore.SelectedCharacter -end - -function NDCore.Functions.GetCharacters() - return NDCore.Characters -end - -- discord rich precense will show on a users profile. if config.enableRichPresence then Citizen.CreateThread(function() @@ -63,4 +51,4 @@ AddEventHandler("playerSpawned", function() NetworkSetFriendlyFireOption(true) end print("^0This framework is created by ^5Andyyy#7666 ^0for support you can join the ^5discord: ^0https://discord.gg/Z9Mxu72zZ6") -end) +end) \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index 5ba6baa..a64984a 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -14,6 +14,7 @@ shared_scripts { } client_scripts { "client/main.lua", + "client/functions.lua", "client/events.lua" }