| Argument | Data Type | Needed | Default | Description |
|---|---|---|---|---|
safe_id | string | ❌ | nil | The unique id of the safe, if nil a new one is generated |
model | string | ✅ | - | The safe model (key) defined in Config.Safes |
coords | vector3 | ✅ | - | The coordinates where the safe will be placed |
rotation | vector3 | ✅ | - | The rotation of the safe |
options | table | ❌ | nil | Overrides the safe inventory (label, slots, weight), if nil the inventory defined in Config.Safes is used |
Returns
Returns
| Type | Description |
|---|---|
| boolean | true if the safe has been created, false otherwise |
| string | The id of the created safe, or the error message if the safe has not been created (Invalid safe data if the model does not exist or the id is not a string, Safe already exists if a safe with that id already exists) |
Example
Example