mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
refactor: client functions
This commit is contained in:
11
client/functions.lua
Normal file
11
client/functions.lua
Normal file
@@ -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
|
||||||
@@ -6,18 +6,6 @@ NDCore.Characters = {}
|
|||||||
NDCore.Functions = {}
|
NDCore.Functions = {}
|
||||||
NDCore.Config = config
|
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.
|
-- discord rich precense will show on a users profile.
|
||||||
if config.enableRichPresence then
|
if config.enableRichPresence then
|
||||||
Citizen.CreateThread(function()
|
Citizen.CreateThread(function()
|
||||||
@@ -63,4 +51,4 @@ AddEventHandler("playerSpawned", function()
|
|||||||
NetworkSetFriendlyFireOption(true)
|
NetworkSetFriendlyFireOption(true)
|
||||||
end
|
end
|
||||||
print("^0This framework is created by ^5Andyyy#7666 ^0for support you can join the ^5discord: ^0https://discord.gg/Z9Mxu72zZ6")
|
print("^0This framework is created by ^5Andyyy#7666 ^0for support you can join the ^5discord: ^0https://discord.gg/Z9Mxu72zZ6")
|
||||||
end)
|
end)
|
||||||
@@ -14,6 +14,7 @@ shared_scripts {
|
|||||||
}
|
}
|
||||||
client_scripts {
|
client_scripts {
|
||||||
"client/main.lua",
|
"client/main.lua",
|
||||||
|
"client/functions.lua",
|
||||||
"client/events.lua"
|
"client/events.lua"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user