Consistent indentation and remove some files

Mixing tabs and spaces when embedding Lua can easily break MDX syntax.
This commit is contained in:
Linden committed 2022-04-29 15:39:04 +10:00
1 parent b87ef48d2e
commit 6bead3ca32
5 files changed
+18 -112

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_size = 2
indent_style = space
@@ -1,24 +0,0 @@
Opens a keyboard input dialog.
The `rows` param takes a table of strings where each string entry will represent
a single row.
```lua
-- header: string
-- rows: table
exports.ox_inventory:Keyboard(header, rows)
```
Returns a table of strings where the first index is going to be the first row of the dialog,
the second index the second row and so on.
**Example:**
```lua
local input = exports.ox_inventory:Keyboard('Money transfer', {'Player name', 'Amount'})
if input then
local playerName = input[1]
local amount = tonumber(input[2])
if not playerName or not amount then return end
end
```
@@ -1,78 +0,0 @@
Starts a progress bar that can callback a function upon completion or cancellation.
Prevents actions such as opening the inventory, reloading, etc.
```lua
-- options: table
-- completed: function
exports.ox_inventory:Progress(options, completed)
```
Options table values:
```lua
-- duration: number
-- label: string
-- useWhileDead: boolean (optional)
-- canCancel: boolean (optional)
-- anim: table (optional)
-- dict: string
-- clip: string
-- flag: number (optional - default is 49)
-- scenario: string (optional)
-- prop/propTwo: table (optional)
-- model: hash or string
-- bone: number (optional - default is 60309)
-- pos: vector3 (optional)
-- rot: vector3 (optional)
-- disable: table (optional)
-- move: boolean (optional)
-- car: boolean (optional)
-- combat: boolean (optional)
-- mouse: boolean (optional)
```
:::danger
If you define a scenario while you have a defined anim table the scenario will be ignored.
:::
**Example:**
```lua
exports.ox_inventory:Progress({
duration = 2000,
label = 'Drinking water',
useWhileDead = false,
canCancel = true,
disable = {
car = true
},
anim = {
dict = 'mp_player_intdrink',
clip = 'loop_bottle',
flag = 49,
},
prop = {
model = 'prop_ld_flow_bottle',
pos = vector3(0.03, 0.03, 0.02),
rot = vector3(0.0, 0.0, -1.5),
bone = 58866
},
}, function(cancel)
if not cancel then
print("You drank some water - that'll quench ya!")
end
end)
```
### CancelProgress
Cancels the currently active progress bar.
```lua
exports.ox_inventory:CancelProgress()
```
### ProgressActive
Returns true or false whether the progress bar is currently active or not
```lua
exports.ox_inventory:ProgressActive()
```
+1 -5
View File
@@ -1,6 +1,6 @@
# Configuration # Configuration
You can add these settings directly to your 'server.cfg', or add them to a separate file and call it with `exec`. You can add these settings directly to your 'server.cfg', or add them to a separate file (i.e. inventory.cfg) and call it with `exec`.
:::caution :::caution
@@ -88,8 +88,4 @@ set datadog:site "datadoghq.com"
# Set server hostname # Set server hostname
set datadog:hostname "FXServer" set datadog:hostname "FXServer"
add_principal group.admin ox_inventory
add_ace resource.ox_inventory command.add_principal allow
add_ace resource.ox_inventory command.remove_principal allow
``` ```
+5 -5
View File
@@ -37,15 +37,15 @@ We provide full backwards compatibility with mysql-async and build for the curre
### Ox Lib ### Ox Lib
A resource designed to provide reusable functions that can be loaded into any resource with simple variable declarations rather than through fxmanifest. Provides easily reusable functions that can be imported into your resource or called with exports.
**Currently used for:** **Used in the inventory for**
- SetInterval - SetInterval
- Server Callbacks - Server Callbacks
- Table utilities (contains, matches)
- Requesting models, animations, etc. - Requesting models, animations, etc.
- Disabling control actions - Marker management
- Notifications and progress bar
<div style={{ width: 'fit-content' }}> <div style={{ width: 'fit-content' }}>
<a href="https://www.github.com/overextended/ox_lib"> <a href="https://www.github.com/overextended/ox_lib">
@@ -58,7 +58,7 @@ A resource designed to provide reusable functions that can be loaded into any re
### Production Build ### Production Build
The interface is written in TypeScript using the React library, so the code included in the repository will not work. The interface is written in TypeScript using the React library, so the code included in the repository will not work.
You either need to build the package yourself (more information in [guides](./Guides) section), or download a release (ox_inventory.zip). You either need to build the package yourself (more information in [guides](./Guides) section), or download a release.
<div style={{ width: 'fit-content' }}> <div style={{ width: 'fit-content' }}>
<a href="https://www.github.com/overextended/ox_inventory/releases/latest" style={{ marginRight: '0.6rem' }}> <a href="https://www.github.com/overextended/ox_inventory/releases/latest" style={{ marginRight: '0.6rem' }}>