1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-10 12:37:55 +02:00
parent df5c2a1624
commit de9002e6d7
97 changed files with 297 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,81 @@
# Prompt Barber - Interior Configuration
This resource provides configurable barber shop interiors for FiveM servers with the ability to enable or disable specific locations.
## Configuration
All settings can be found in `config.lua`. You can enable or disable interiors for each barber shop location by changing the `enabled` value to `true` or `false`.
### Available Locations
| Location | Coordinates | Default Status |
|----------|-------------|----------------|
| **Paleto Bay** | -278.32, 6228.18, 30.71 | Enabled |
| **Downtown** | -33.02, -152.32, 56.09 | Enabled |
| **Vespucci** | -1282.87, -1117.28, 6.01 | Enabled |
| **Mirror Park** | 1212.29, -472.81, 65.22 | Enabled |
| **Davis (Ghetto)** | 136.94, -1708.16, 28.31 | Enabled |
| **Sandy Shores** | 1931.79, 3730.24, 31.86 | Enabled |
### How to Configure
1. Open `config.lua`
2. Find the location you want to modify
3. Change `enabled = true` to `enabled = false` to disable the interior
4. Change `enabled = false` to `enabled = true` to enable the interior
5. Restart the resource
**Example:**
```lua
-- To disable the Paleto Bay barber shop interior:
paleto = {
enabled = false, -- Changed from true to false
coords = vector3(-278.324158, 6228.18164, 30.7110977),
interior_type = 'v_barbers'
},
```
### Debug Mode
You can enable debug mode to see console messages about which interiors are being enabled/disabled:
```lua
Config.Debug = true -- Set to true to enable debug messages
```
### Console Commands (Debug)
When debug mode is enabled, you can use the following console command:
- `togglebarber <location>` - Toggle a specific location's interior on/off
Available location names: `paleto`, `city`, `vespucci`, `mirror_park`, `ghetto`, `sandy`
**Example:**
```
togglebarber paleto -- Toggles Paleto Bay barber interior
togglebarber city -- Toggles Downtown barber interior
```
## Installation
1. Place the resource in your `resources` folder
2. Add `ensure prompt_barber` to your `server.cfg`
3. Configure the locations in `config.lua` as needed
4. Restart your server
## Notes
- Interiors are managed automatically when the resource starts
- Changes to the config require a resource restart to take effect
- Disabling an interior will make it inaccessible to players
- All locations are enabled by default
## Troubleshooting
If you're having issues:
1. Enable debug mode in `config.lua` (`Config.Debug = true`)
2. Check console for any error messages
3. Ensure coordinates are correct for your map files
4. Restart the resource after making config changes

View file

@ -0,0 +1,101 @@
-- Barber Shop Interior Management System
CreateThread(function()
Wait(1000) -- Wait for game to fully load
if Config.Debug then
print("^2[Barber Interiors]^0 Starting interior management...")
end
-- Process each location from config
for locationName, locationData in pairs(Config.Locations) do
if locationData.coords then
local interior = GetInteriorAtCoordsWithType(
locationData.coords.x,
locationData.coords.y,
locationData.coords.z,
locationData.interior_type
)
if interior and interior ~= 0 then
if locationData.enabled then
-- Enable the interior
DisableInterior(interior, false)
PinInterior(interior)
if Config.Debug then
print(string.format("^2[Barber Interiors]^0 Enabled interior for %s at coords: %.2f, %.2f, %.2f",
locationName, locationData.coords.x, locationData.coords.y, locationData.coords.z))
end
else
-- Disable the interior
DisableInterior(interior, true)
UnpinInterior(interior)
if Config.Debug then
print(string.format("^1[Barber Interiors]^0 Disabled interior for %s at coords: %.2f, %.2f, %.2f",
locationName, locationData.coords.x, locationData.coords.y, locationData.coords.z))
end
end
else
if Config.Debug then
print(string.format("^3[Barber Interiors]^0 Warning: No interior found for %s at coords: %.2f, %.2f, %.2f",
locationName, locationData.coords.x, locationData.coords.y, locationData.coords.z))
end
end
end
end
if Config.Debug then
print("^2[Barber Interiors]^0 Interior management completed!")
end
end)
-- Function to toggle a specific location's interior (for debugging or admin commands)
function ToggleBarberInterior(locationName)
if not Config.Locations[locationName] then
print("^1[Barber Interiors]^0 Error: Location '" .. locationName .. "' not found!")
return false
end
local locationData = Config.Locations[locationName]
local interior = GetInteriorAtCoordsWithType(
locationData.coords.x,
locationData.coords.y,
locationData.coords.z,
locationData.interior_type
)
if interior and interior ~= 0 then
locationData.enabled = not locationData.enabled
if locationData.enabled then
DisableInterior(interior, false)
PinInterior(interior)
print(string.format("^2[Barber Interiors]^0 Enabled interior for %s", locationName))
else
DisableInterior(interior, true)
UnpinInterior(interior)
print(string.format("^1[Barber Interiors]^0 Disabled interior for %s", locationName))
end
return true
else
print(string.format("^3[Barber Interiors]^0 Warning: No interior found for %s", locationName))
return false
end
end
-- Console command for toggling interiors (optional - for debugging)
RegisterCommand('togglebarber', function(source, args)
if #args < 1 then
print("^3[Barber Interiors]^0 Usage: togglebarber <location>")
print("^3[Barber Interiors]^0 Available locations: paleto, city, vespucci, mirror_park, ghetto, sandy")
return
end
ToggleBarberInterior(args[1])
end, false)
-- paleto: -278.324158, 6228.18164, 30.7110977
-- city: -33.0160065, -152.317963, 56.0920944
-- vespucci: -1282.87061, -1117.27551, 6.005688
-- mirror: 1212.29236, -472.808533, 65.22362
-- ghetto: 136.937012, -1708.16211, 28.3071842

View file

@ -0,0 +1,39 @@
Config = {}
-- Barber Shop Locations Configuration
-- Set to true to ENABLE interior, false to DISABLE interior
Config.Locations = {
paleto = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(-278.324158, 6228.18164, 30.7110977),
interior_type = 'v_barbers'
},
city = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(-33.0160065, -152.317963, 56.0920944),
interior_type = 'v_barbers'
},
vespucci = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(-1282.87061, -1117.27551, 6.005688),
interior_type = 'v_barbers'
},
mirror_park = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(1212.29236, -472.808533, 65.22362),
interior_type = 'v_barbers'
},
ghetto = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(136.937012, -1708.16211, 28.3071842),
interior_type = 'v_barbers'
},
sandy = {
enabled = false, -- DISABLED - we put a new interior here
coords = vector3(1931.78516, 3730.23828, 31.8600159),
interior_type = 'v_barbers'
}
}
-- Debug mode - set to true to see console messages about interior status
Config.Debug = false

View file

@ -0,0 +1,5 @@
If you need to remove the location simply delete the folder with the corresponding name of the location in "stream" folder
If you need to add the default location back as well - go to config.lua and set location enabled to "true"
Locations coordinates, props and etc information can be found on gitbook: https://prompt-studio.gitbook.io/prompt-studio/civilian-maps/barber-shop-rework-6-locations

View file

@ -0,0 +1,35 @@
fx_version 'bodacious'
game 'gta5'
this_is_a_map 'yes'
files {
'prompt_barber_new.xml'
}
data_file 'TIMECYCLEMOD_FILE' 'prompt_barber_new.xml'
escrow_ignore {
'stream/ghetto/**',
'stream/city/**',
'stream/mirror_park/**',
'stream/paleto/**',
'stream/sandy/**',
'stream/vespucci/**',
'stream/interior/unlocked/**',
'client.lua',
'config.lua'
}
-- scripts --
lua54 'yes'
shared_script 'config.lua'
client_script 'client.lua'
escrow_ignore {
'stream/unlocked/**'
}
dependency '/assetpacks'

View file

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<timecycle_modifier_data version="1.000000">
<modifier name="prompt_barber_new" numMods="31" userFlags="0">
<light_directional_amb_col_r>0.000 1.000</light_directional_amb_col_r>
<light_directional_amb_col_g>0.000 1.000</light_directional_amb_col_g>
<light_directional_amb_col_b>0.000 1.000</light_directional_amb_col_b>
<light_artificial_int_down_col_r>1.335 1.000</light_artificial_int_down_col_r>
<light_artificial_int_down_col_g>0.943 1.000</light_artificial_int_down_col_g>
<light_artificial_int_down_col_b>1.694 1.000</light_artificial_int_down_col_b>
<light_artificial_int_down_intensity>0.200 0.000</light_artificial_int_down_intensity>
<light_artificial_int_up_col_r>0.839 1.000</light_artificial_int_up_col_r>
<light_artificial_int_up_col_g>0.859 1.000</light_artificial_int_up_col_g>
<light_artificial_int_up_col_b>0.875 1.000</light_artificial_int_up_col_b>
<light_artificial_int_up_intensity>0.210 0.000</light_artificial_int_up_intensity>
<ped_light_col_r>0.575 1.000</ped_light_col_r>
<ped_light_col_g>1.000 1.000</ped_light_col_g>
<ped_light_col_b>0.502 1.000</ped_light_col_b>
<ped_light_mult>0.100 1.000</ped_light_mult>
<postfx_exposure>-0.680 0.000</postfx_exposure>
<postfx_bright_pass_thresh_width>0.560 0.000</postfx_bright_pass_thresh_width>
<postfx_bright_pass_thresh>0.760 0.000</postfx_bright_pass_thresh>
<postfx_intensity_bloom>3.806 0.000</postfx_intensity_bloom>
<postfx_desaturation>1.050 0.000</postfx_desaturation>
<postfx_vignetting_contrast>-0.010 0.000</postfx_vignetting_contrast>
<postfx_grad_top_col_r>1.000 0.000</postfx_grad_top_col_r>
<fog_start>73.000 73.000</fog_start>
<reflection_lod_range_start>0.000 0.000</reflection_lod_range_start>
<reflection_lod_range_end>5.000 0.000</reflection_lod_range_end>
<reflection_slod_range_start>5.000 0.000</reflection_slod_range_start>
<reflection_slod_range_end>5.000 0.000</reflection_slod_range_end>
<reflection_interior_range>25.000 0.000</reflection_interior_range>
<temperature>20.000 0.000</temperature>
<natural_ambient_multiplier>0.100 0.000</natural_ambient_multiplier>
<artificial_int_ambient_multiplier>0.160 0.000</artificial_int_ambient_multiplier>
</modifier>
</timecycle_modifier_data>