mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
1.2 KiB
1.2 KiB
Importing the core functions
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import IconButton from '@site/src/components/IconButton'; import { FaNpm } from 'react-icons/fa';
Lua
Lua imports can be defined as part of fxmanifest, or loaded with the load function.
client_scripts {
'@ox_core/imports/client.lua',
'client/main.lua',
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'@ox_core/imports/server.lua',
'server/main.lua',
}
local file = ('imports/%s.lua'):format(IsDuplicityVersion() and 'server' or 'client')
local import = LoadResourceFile('ox_core', file)
local chunk = assert(load(import, ('@@ox_core/%s'):format(file)))
chunk()
JS/TS
If in case you want to write resources in JS/TS you will need to install our node client and server wrapper package, which will allow you to use the core's functions with full type and intellisense support.
}>Package