Core developer docs

Developer documentation

⚠️

Documentation might have missing features, join our discord for help! Andy's Development Discord server

Importing NDCore

fxmanifest.lua
shared_script "@ND_Core/init.lua"

You can also use this if you have multiple shared scripts.

fxmanifest.lua
shared_scripts {
    "@ND_Core/init.lua"
}

If you're only using client or only using server you can also just import one of them.

fxmanifest.lua
server_script "@ND_Core/init.lua"
fxmanifest.lua
client_script "@ND_Core/init.lua"

Since every function in ND Core is an export you could also do it as shown in the example below:

client.lua
local player = exports["ND_Core"]:getPlayer()
 
print(player.firstname)

You could also do it this way for simplicity:

client.lua
local NDCore = exports["ND_Core"]
 
local player = NDCore:getPlayer()
 
print(player.firstname)