Configuration
Config.lua Documentation
This document explains all configuration options available in config.lua and how they are used throughout the nn_storage system.
Creator Configuration
Config.Creator
Config.CreatorControls access to the storage creation command and UI.
Config.Creator = {
Command = "cstorage",
Job = "realestate",
}Command (string)
Default:
"cstorage"Usage: Defines the chat command players use to open the storage creator UI
Description: Players type
/cstorage(or whatever you set) to open the creator interface
Job (string)
Default:
"realestate"Usage: Restricts creator access to specific job
Description: Only players with this job can create storage units. Set to
"nil"to allow all playersSpecial: If set to
"nil"(string), bypasses job requirement
Player Configuration
Config.MaxPlayerWeight
Config.MaxPlayerWeightSets the maximum carrying capacity for players in the inventory system.
Type:
number(kilograms)Default:
100Usage: Used when sending player inventory data to UI
Description: Maximum weight a player can carry in their inventory (displayed in kg)
Config.GetItemImage
Config.GetItemImageFunction that generates image URLs for inventory items.
Type:
functionParameter:
itemName(string) - The item's name/identifierReturns:
string- Complete URL to the item's imageUsage: Called when building inventory data for UI display
Customization: Modify the base URL to point to your inventory system's image directory
Storage Configuration
Config.Storage
Config.StorageMain storage system configuration containing all storage-related settings.
SafeProps (table)
List of prop models that can be used for safe storage units.
Type:
table(array of strings)Usage: Provides options in the creator UI for safe prop selection
Description: GTA V prop models that can be used as visual representations for safes
SageOffsets (table)
Position offsets for different storage props to align interaction points properly.
Type:
table(prop_name -> vector3)Usage: Adjusts interaction point positioning relative to prop center
Description: Fine-tunes where players interact with storage props for better UX
ContainerProps (table)
Defines the default prop model used for container storage units.
Type:
tableUsage: Auto-assigned when creating container storage
Description: Container storage always uses this prop model (shipping container)
Pricing (table)
Cost structure for different storage types based on capacity and features.
Type:
table(storage_type -> pricing_config)Usage: Calculates total cost during storage creation
Components:
base: Fixed base cost for the storage typecapacityPrice: Cost per kilogram of storage capacitykeyPrice: Cost per physical key generated
WeightLimits (table)
Minimum and maximum weight capacities for each storage type.
Type:
table(storage_type -> {min, max})Usage: Enforces capacity limits in creator UI
Description: Sets the allowable weight range for each storage type (in kg)
Placement (table)
Visual and interaction settings for the storage placement system.
Type:
tableUsage: Controls visual feedback during storage placement
Components:
markerType: GTA V marker type ID (1 = downward arrow)markerColor: RGBA color values for the placement markermarkerSize: X, Y, Z scale of the placement markerinteractionDistance: How close players must be to interact (in meters)placementDistance: Maximum distance from player for placing storage
Item Rarity Configuration
Config.Rarity
Config.RarityDefines rarity levels for items, affecting their visual appearance in the inventory UI.
Type:
table(item_name -> rarity_level)Usage: Applied when building item data for UI display
Rarity Levels:
"common","uncommon","rare","epic","legendary"Default: Items not listed default to
"common"UI Effect: Different rarity levels display with different colors/styling in the inventory
Storage Key Configuration
Config.StorageKey
Config.StorageKeyDefines the item properties for physical storage keys when using key-based access.
Type:
tableUsage: Referenced when creating physical key items for storage access
Components:
item_name: Database identifier for the key itemlabel: Display name shown in inventorydescription: Tooltip text for the itemweight: Item weight in kilograms (0.1kg)image: Filename for the key's inventory iconstackable: Whether multiple keys can stack (false for unique keys)
Configuration Usage Patterns
Price Calculation
The system uses a three-component pricing model:
Base Price: Fixed cost per storage type
Capacity Price: Variable cost based on weight capacity
Key Price: Additional cost for each physical key
Weight Management
Server stores weights in grams internally
UI displays weights in kilograms
Conversion happens during data transfer (weight / 1000)
Access Control Priority
Job Access: Automatic access if player job matches storage job
Key Access: Requires physical key item in inventory
PIN Access: Requires correct PIN code entry
Public Access: No authentication required
Storage Type Differences
Safes: Optional props, medium capacity, higher cost per kg
Lockers: Multiple units per storage, no props, lowest cost per kg
Containers: Always use props, highest capacity, lowest cost per kg
Customization Examples
Change Storage Capacity Limits
Adjust Pricing
Change Creator Access
Custom Item Images
Last updated