Files
ox_lib/README.md

42 lines
1.7 KiB
Markdown
Raw Normal View History

2022-02-28 14:17:25 +11:00
## Lua Library for FiveM
2021-11-16 11:15:59 +11:00
FXServer provides its own system for including files, which we use to load this resource in the fxmanifest via
```lua
2022-02-28 14:17:25 +11:00
shared_script '@ox_lib/init.lua'
2021-11-16 11:15:59 +11:00
```
2022-03-01 10:55:46 +00:00
<div align='center'><h3><a href='https://overextended.github.io/docs/'>Documentation</a></h3></div>
2022-02-28 14:17:25 +11:00
Once loaded, any resource can call exports or load modules with the `lib` keyword, i.e.
2021-11-16 11:15:59 +11:00
```lua
2022-02-28 14:17:25 +11:00
lib.callbacks.Register(...)
2021-11-16 11:15:59 +11:00
```
2021-11-11 08:07:33 +11:00
2022-02-28 14:17:25 +11:00
Modules are loaded into the environment of the invoking resource, unlike exports which are called via function reference.
2022-01-10 01:00:45 +11:00
2021-11-11 08:07:33 +11:00
2021-11-25 01:21:22 +11:00
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).
Any resources distributed with this code is subject to the same license restrictions and must be made available under the same license ([more below](#license)).
2021-11-16 11:15:59 +11:00
2021-10-30 16:01:52 +11:00
2021-11-16 11:15:59 +11:00
<br><h2>License</h2>
<table><tr><td>
2022-02-28 14:17:25 +11:00
ox_lib
2021-11-16 11:15:59 +11:00
Copyright (C) 2021 Linden <https://www.github.com/thelindat>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
2021-10-30 16:09:20 +11:00
2021-11-16 11:15:59 +11:00
You should have received a copy of the GNU General Public License along with this program.
If not, see <https://www.gnu.org/licenses/gpl-3.0.html>
</td></tr>
<tr><td>
<font align='center'>https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)</font>
2022-01-08 20:47:25 +05:30
</td></td></table>