copy Copy chevron-down
π House robberyπ οΈ ConfigurationThis document describes all configuration options for the DevHub House Robbery resource.
Shared Configuration ( configs/shared.lua )
Debug Configuration
Controls debug output for the house robbery system.
Copy Shared.Debug = {
Enabled = false , -- Set to true to enable all debug prints
Levels = {
Info = true , -- General information
Success = true , -- Success operations
Warning = true -- Warning and potential issues
}
} Enabled : Enables/disables all debug prints.
Levels : Controls specific debug message types.
House Tiers Configuration
Defines different house interior templates with their props and entry points.
Copy Shared.HouseTiers = {
[ " tier1 " ] = {
{
props = House1,
entry = vec3 ( 918.5439 , - 933.0507 , - 90.4959 ),
},
-- Additional tier1 house configurations...
},
[ " tier2 " ] = {
-- Tier2 house configurations...
},
[ " tier3 " ] = {
-- Tier3 house configurations...
}
} tier1/tier2/tier3 : Different house difficulty tiers with varying loot quality and quantity.
props : Reference to the house's lootable prop configuration (House1, House2, etc.).
entry : Vector3 coordinates for the interior entry point.
House Props Configuration
Each house (House1, House2, etc.) contains a list of lootable items:
itemName : The item given to the player when the prop is collected.
coords : World coordinates of the prop inside the house interior.
rotation : Rotation of the prop (vec3 or vec4 format).
prop : The prop model name.
Client Configuration ( configs/client.lua )
Default Location
Defines where players are teleported if they're in a house area without permission.
DefaultLocation : Coordinates for the default teleport location (usually outside the restricted area).
Server Configuration ( configs/server.lua )
Alarm Triggering Function
Custom function to handle alarm triggering when sensors are activated.
source : The player's server ID who triggered the alarm.
coords : The coordinates where the alarm was triggered.
Usage : Customize this function to integrate with your police/dispatch system.
Tier Chance Configuration
Defines the probability of encountering higher-tier houses.
tier2 : Percentage chance for tier2 houses (50%).
tier3 : Percentage chance for tier3 houses (25%).
Note : If neither tier2 nor tier3 is selected, tier1 is used by default (25% remaining chance).
House Coordinates
Defines all available house locations for each tier across the map.
tier1/tier2/tier3 : Arrays of vec4 coordinates (x, y, z, heading) for house entrances on the map.
Usage : These coordinates mark where players can start a robbery.
Cooldown System
Controls how long players must wait before starting another robbery.
Cooldown : Time in seconds before another robbery can be started (default: 30 minutes).
Sensor Activation System
Defines the probability of triggering a sensor based on the number of items collected.
Key : Number of items collected.
Value : Percentage chance to trigger the alarm sensor.
Behavior : For items beyond 10, the chance remains at 30%.
Example : Collecting the 5th item has a 20% chance to trigger the alarm.
Translation Configuration ( configs/translation.lua )
Customize all user-facing text in the resource.
Modify these strings to change the language or customize messages.
Add your own language translations by following the same format.
Skill Tree Configuration ( configs/skillTree.lua )
Enable/Disable Skill Tree
To enable the skill tree integration, modify Shared.DevhubSkillTreeEnabled in configs/shared.lua:
Defines the skill tree category for the house robbery system.
Player approaches a house entrance from Config.HousesCoords.
Tier is randomly selected based on Config.TiersChance.
Player enters the house interior (teleported to entry coordinates).
Player collects lootable props (items defined in House1, House2, etc.).
Sensor chance increases with each item collected (Config.PropSensorActivationPercent).
If sensor triggers , TriggerAlarm() function is called.
Add new houses : Create new house prop configurations (e.g., House7) and add entries to Shared.HouseTiers.
Modify loot tables : Edit the itemName values in each house configuration to change available loot.
Adjust difficulty : Modify Config.TiersChance and Config.PropSensorActivationPercent to change risk/reward balance.
Add more locations : Expand Config.HousesCoords arrays with new vec4 coordinates.
Customize alarm behavior : Implement your logic in the TriggerAlarm() function in server.lua.
Change cooldown : Modify Config.Cooldown to adjust wait time between robberies.
Integrate with skill tree : Enable Shared.DevhubSkillTreeEnabled and configure skills in skillTree.lua.
Advanced Configuration
Adding a New House Interior
Create a new house configuration in configs/shared.lua:
Add the new house to a tier in Shared.HouseTiers:
Modifying Sensor Difficulty
To make robberies easier or harder, adjust the sensor activation percentages:
Easier (Lower Alarm Chance):
Harder (Higher Alarm Chance):
Item Configuration
The resource includes item configuration files for different inventory systems:
items/esx_items.lua : ESX framework items
items/qb_items.lua : QBCore framework items
items/img/ : Item images for inventory systems
Ensure the items defined in itemName fields match your inventory system's item names.
Required Resources
β οΈ IMPORTANT: Asset Dependency
This resource requires the devhub_houseRobbery_assets resource to function properly.
Installation Steps:
Ensure both resources are in your resources folder:
Start both resources in your server.cfg in the correct order:
Why is this required?
devhub_houseRobbery_assets contains all prop models, textures, and interior assets.
Without it, props will not spawn and interiors will not load correctly.
Troubleshooting
Resource not starting:
β
Verify devhub_houseRobbery_assets is started before devhub_houseRobbery.
Check server console for any asset loading errors.
Players can't start robberies:
Check if Config.Cooldown has expired.
Verify Config.HousesCoords contains valid coordinates.
Ensure players have the required items/permissions (if implemented).
β
Confirm devhub_houseRobbery_assets is running.
Alarms not triggering:
Implement the TriggerAlarm() function in server.lua.
Check Config.PropSensorActivationPercent values are greater than 0.
Props not spawning:
β
First, ensure devhub_houseRobbery_assets is started!
Verify prop model names in house configurations are valid.
Check coordinates are within the interior boundaries.
Enable debug mode to see error messages.
Restart both resources in the correct order.
Last updated 3 months ago