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
21 files changed
+146 -240

No files matched your search

@@ -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 -1
View File
@@ -10,6 +10,6 @@ The following snippet can be used in crafting resources such as okokCrafting or
local itemNames = {}
for item, data in pairs(exports.ox_inventory:Items()) do
itemNames[item] = data.label
itemNames[item] = data.label
end
```