mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
Update README.md
This commit is contained in:
16
README.md
16
README.md
@@ -1,19 +1,17 @@
|
|||||||
|
<div align='center'><h1><a href='https://overextended.github.io/docs/'>Documentation</a></h3></div>
|
||||||
|
<br>
|
||||||
|
|
||||||
## Lua Library for FiveM
|
## Lua Library for FiveM
|
||||||
FXServer provides its own system for including files, which we use to load this resource in the fxmanifest via
|
FXServer provides its own system for including files, which we use to load this resource in the fxmanifest via
|
||||||
```lua
|
```lua
|
||||||
shared_script '@ox_lib/init.lua'
|
shared_script '@ox_lib/init.lua'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### server.cfg
|
||||||
<div align='center'><h3><a href='https://overextended.github.io/docs/'>Documentation</a></h3></div>
|
```
|
||||||
|
add_ace resource.ox_lib command.add_principal allow
|
||||||
|
add_ace resource.ox_lib command.remove_principal allow
|
||||||
Once loaded, any resource can call exports or load modules with the `lib` keyword, i.e.
|
|
||||||
```lua
|
|
||||||
lib.callbacks.Register(...)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Modules are loaded into the environment of the invoking resource, unlike exports which are called via function reference.
|
|
||||||
|
|
||||||
|
|
||||||
If you don't want to use this resource, but want to reuse code you are permitted to do so under the [license terms](https://www.gnu.org/licenses/gpl-3.0.html).
|
If you don't want to use this resource, but want to reuse code you are permitted to do so under the [license terms](https://www.gnu.org/licenses/gpl-3.0.html).
|
||||||
|
|||||||
Reference in New Issue
Block a user