Description: This is a storage/stash system script for RSG
that allows players to place persistent storage boxes in the game world. Players can:


Updated V3 "UPDATED"
- Resource Clean-up - FIXED
- Optional Storage Code Issue - FIXED
- Missing Translations - FIXED
- Lockpick Functionality - FIXED
Now Saves in Inventory when Press Cancel, Only Removed From Inventory when Placed.
New Image added - Thanks to Tankie
- Place storage boxes in the world
- Access their stored items
- Set access codes for security
- Destroy their stashes
- Items persist through server restarts
Key Features:
- Secure stash system with optional PIN protection
- Persistence through server restarts (saves to database)
- Multiple stashes per player (configurable limit)
- Visual smoke effects when destroying stashes
- Ground vegetation clearing around stashes (optional)
- Target system integration for interaction
Config Options:
luaCopyConfig.EnableVegModifier = true -- Clears vegetation around stashes
Config.StashMaxWeight = 4000000 -- Maximum weight capacity
Config.StashMaxSlots = 48 -- Number of inventory slots
Config.DestroyTime = 10000 -- Time to destroy stash (milliseconds)
Config.MaxStashes = 8 -- Max stashes per character
Config.StashProp = 's_footlocker05x' -- Prop model usedUsage:
- Players can create stashes using either:
/createstashcommand- Using a "storagebox" item
- Players can:
- Set access codes
- Open stashes
- Destroy their own stashes
- Store/retrieve items
Database Integration:
- Uses MySQL to store:
- Stash locations
- Access codes
- Ownership information
- Properties/configuration
- Table:
player_stashes- Stores stash properties
- Links stashes to player citizenids
- Maintains access codes
Dependencies:
- RSG-Core (RedM core framework)
- RSG-Target (for interaction)
- RSG-Inventory (inventory system)
- MySQL Async
- Ox_lib (for notifications and UI elements)
Security Features:
- Ownership verification
- Optional PIN protection
- Server-side validation
- Anti-duplication checks
- Distance checks for placement
The script includes several safeguards:
- Can't place stashes too close together
- Only owners can destroy stashes
- Server-side ownership verification
- Protected access code system
This script would be particularly useful for RedM roleplay servers where players need persistent storage solutions with security features.