# Envi-Bridge

### Bridge Settings (Optional) <a href="#bridge-settings-optional" id="bridge-settings-optional"></a>

The bridge auto detects all components.

### <mark style="color:orange;">Do not add these unless you either know what you're doing, or you've been told to do so by Envi-Scripts staff.</mark> 

**These should only be used if we want to override certain things in the bridge.**

\
If for example, you use a renamed database/framework/inventory/target/zone you can change the names using the following convars added to your server.cfg\
\
These should be placed somewhere before the envi-bridge resource starts\
\
You can also override database/framework/inventory/target/zone resources.

```lua
-- Turn On Debug Mode
setr bridge:debug "true"
 
-- Change Language
setr bridge:locale "en"     -- (CURRENTLY UNUSED)
 
-- Override Database
setr bridge:database "oxmysql"
 
-- Override Database Resource Name (Used For Export)
setr bridge:databasename "oxmysql"
 
-- Override Framework
setr bridge:framework "esx"
 
-- Override Framework Resource Name (Used For Export)
setr bridge:frameworkname "es_extended"
 
-- Override Framework Resource Name (Used For Event)
setr bridge:frameworkevent "esx:getSharedObject"
 
-- Override Framework Prefix
setr bridge:frameworkprefix "esx"
 
-- Override Inventory
setr bridge:inventory "ox_inventory"
 
-- Override Inventory Resource Name (Used For Export)
setr bridge:inventoryname "ox_inventory"
 
-- Override Inventory Image Path
setr bridge:inventoryimagepath "ox_inventory/web/images/"
 
-- Override Target 
setr bridge:target "ox_target"
 
-- Override Target Name (Used For Export)
setr bridge:targetname "ox_target"
 
-- Override Zone 
setr bridge:zone "ox_lib"
 
-- Override Zone Name (Used For Export)
setr bridge:zonename "ox_lib"
```

### Example Usage <a href="#bridge-settings-optional" id="bridge-settings-optional"></a>

There may be some unsupported inventories that work by having backwards compatibility support with default qb-inventory triggers. In these cases, we want envi-bridge to read the **inventory/qb-inventory** files and skip any auto-detection. \
\
Here is an example of how we would do this for **origen-inventory (qb-core only) :**

```lua
setr bridge:inventory "qb-inventory"
setr bridge:inventoryname "qb-inventory"
setr bridge:inventoryevent "qb-inventory"
setr bridge:inventoryimagepath "origen_inventory/html/images/"
```

