Update examples and descriptions for ox_inventory

This commit is contained in:
Linden committed 2022-03-02 19:18:34 +11:00
1 parent 2a931c887a
commit ee76abb4db
10 files changed
+114 -125

No files matched your search

+1 -89
View File
@@ -32,7 +32,7 @@ We provide full backwards compatibility with mysql-async and build for the curre
</a>
</div>
### Lua Library
### Ox Lib
A resource designed to provide reusable functions that can be loaded into any resource with simple variable declarations rather than through fxmanifest.
@@ -98,94 +98,6 @@ The inventory will handle disabling the phone when the player has no item, and s
</a>
</div>
## Configuration
You can add these settings directly to your 'server.cfg', create a new (or multiple) file to load with 'exec'
or add them to the `config.cfg` file in the inventory root and execute that.
You do not need to specify convars when you are not changing the values, as they will default.
```
# Activate specific event handlers and functions (supported: ox, esx)
setr inventory:framework "esx"
# Load specific language file from data/locales
setr inventory:locale "en"
# Number of slots for player inventories
setr inventory:slots 50
# Maximum carry capacity for players, in kilograms
setr inventory:weight 30000
# Weapons will reload after reaching 0 ammo
setr inventory:autoreload false
# Blur the screen while accessing the inventory
setr inventory:screenblur true
# Trim whitespace from vehicle plates when checking owned vehicles
setr inventory:trimplate true
# Integrated support for qtarget stashes, shops, etc
setr inventory:qtarget false
# Default hotkeys to access primary and secondary inventories, and hotbar
setr inventory:keys ["F2", "K", "TAB"]
# Enable control action when inventory is open
setr inventory:enablekeys [249]
# Jobs with access to police armoury, evidence lockers, etc
setr inventory:police ["police", "sheriff"]
# Item prices fluctuate in shops
set inventory:randomprices true
# Compare current version to latest release on GitHub
set inventory:versioncheck true
# Loot will randomly generate inside unowned vehicles and dumpsters
set inventory:randomloot true
# Minimum job grade to remove items from evidence lockers
set inventory:evidencegrade 2
# Stashes will be wiped after remaining unchanged for the given time
set inventory:clearstashes "6 MONTH"
# Set the contents of randomly generated inventories
# [item name, minimum, maxiumum, loot chance]
set inventory:vehicleloot [
["cola", 1, 1],
["water", 1, 1],
["garbage", 1, 2, 50],
["panties", 1, 1, 5],
["money", 1, 50],
["money", 200, 400, 5],
["bandage", 1, 1]
]
set inventory:dumpsterloot [
["mustard", 1, 1],
["garbage", 1, 3],
["money", 1, 10],
["burger", 1, 1]
]
# Set datadog API key for inventory logging (https://app.datadoghq.com/organization-settings/api-keys)
set datadog:key ""
# Set server intake (https://docs.datadoghq.com/api/latest/logs/#send-logs)
set datadog:site "datadoghq.com"
# Set server hostname
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
```
### Installation