ed
This commit is contained in:
parent
cd945f7aff
commit
fdb2ec1452
3046 changed files with 68309 additions and 12 deletions
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/.fxap
Normal file
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/.fxap
Normal file
Binary file not shown.
|
@ -0,0 +1,50 @@
|
|||
Use /cityhall command
|
||||
|
||||
|
||||
Entity sets:
|
||||
|
||||
static_elevator
|
||||
conference_chairs
|
||||
conference_meeting_table
|
||||
eventroom_voting
|
||||
|
||||
Ipls:(they are made so you can combine them and create your own event)
|
||||
|
||||
p_prompt_sandy_cityhall_backtables
|
||||
p_prompt_sandy_cityhall_coffin_closed
|
||||
p_prompt_sandy_cityhall_coffin_opened
|
||||
p_prompt_sandy_cityhall_fences_backclosed
|
||||
p_prompt_sandy_cityhall_fences_backopened
|
||||
p_prompt_sandy_cityhall_funeral_chairs
|
||||
p_prompt_sandy_cityhall_funeral_picture
|
||||
p_prompt_sandy_cityhall_leaves
|
||||
p_prompt_sandy_cityhall_tables
|
||||
p_prompt_sandy_cityhall_wedding_chairs
|
||||
p_prompt_sandy_cityhall_wedding_spotlight
|
||||
p_prompt_sandy_cityhall_wedding_venue
|
||||
|
||||
|
||||
Preconfigured IPLS for events if you are lazy to create your own:
|
||||
|
||||
Dinner:
|
||||
p_prompt_sandy_cityhall_backtables
|
||||
p_prompt_sandy_cityhall_tables
|
||||
p_prompt_sandy_cityhall_fences_backopened
|
||||
|
||||
Dinner with closed back
|
||||
p_prompt_sandy_cityhall_tables
|
||||
p_prompt_sandy_cityhall_fences_backclosed
|
||||
|
||||
Wedding Ceremony:
|
||||
p_prompt_sandy_cityhall_fences_backclosed
|
||||
p_prompt_sandy_cityhall_wedding_chairs
|
||||
p_prompt_sandy_cityhall_wedding_spotlight
|
||||
p_prompt_sandy_cityhall_wedding_venue
|
||||
|
||||
Funeral:
|
||||
p_prompt_sandy_cityhall_fences_backclosed
|
||||
p_prompt_sandy_cityhall_funeral_chairs
|
||||
p_prompt_sandy_cityhall_funeral_picture
|
||||
|
||||
Add Leaves?:
|
||||
p_prompt_sandy_cityhall_leaves
|
16
resources/[defaultmaps]/prompt_sandy_cityhall/README.txt
Normal file
16
resources/[defaultmaps]/prompt_sandy_cityhall/README.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
This map was developer by Prompt Studio
|
||||
|
||||
|
||||
---------------------------------Compatibility Section-------------------------------
|
||||
|
||||
Check your server console for further information and directions about sandy map data. Follow the console directions.
|
||||
|
||||
|
||||
--------------------------------- Config section-------------------------------------------
|
||||
|
||||
Check public_config.lua for more information
|
||||
|
||||
--------------------------------- Coordinates -------------------------------------------
|
||||
|
||||
1728.1, 3787.36, 35.18
|
||||
|
Binary file not shown.
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<AudioWaveContainer>
|
||||
<Version value="1" />
|
||||
<ChunkIndices value="True" />
|
||||
<Streams>
|
||||
<Item>
|
||||
<Name>bell_98033</Name>
|
||||
<FileName>bell_98033.wav</FileName>
|
||||
<Chunks>
|
||||
<Item>
|
||||
<Type>peak</Type>
|
||||
</Item>
|
||||
<Item>
|
||||
<Type>data</Type>
|
||||
</Item>
|
||||
<Item>
|
||||
<Type>format</Type>
|
||||
<Codec>PCM</Codec>
|
||||
<Samples value="236161" />
|
||||
<SampleRate value="32000" />
|
||||
<Headroom value="-100" />
|
||||
<PlayBegin value="0" />
|
||||
<PlayEnd value="0" />
|
||||
<LoopBegin value="0" />
|
||||
<LoopEnd value="0" />
|
||||
<LoopPoint value="-1" />
|
||||
<Peak unk="0" />
|
||||
</Item>
|
||||
</Chunks>
|
||||
</Item>
|
||||
</Streams>
|
||||
</AudioWaveContainer>
|
Binary file not shown.
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/client/client.lua
Normal file
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/client/client.lua
Normal file
Binary file not shown.
139
resources/[defaultmaps]/prompt_sandy_cityhall/client/open.lua
Normal file
139
resources/[defaultmaps]/prompt_sandy_cityhall/client/open.lua
Normal file
|
@ -0,0 +1,139 @@
|
|||
-- IMPORTANT DISCLAIMER:
|
||||
-- This file contains critical functions for elevator operation.
|
||||
-- DO NOT modify anything unless you know exactly what you are doing.
|
||||
-- Any incorrect changes can break the entire elevator system.
|
||||
|
||||
-- Global system variables
|
||||
isInsideElevator = false
|
||||
currentTextUI = nil
|
||||
|
||||
-- Function to update screen text
|
||||
-- @param newText - New text to display (nil to hide)
|
||||
function updateTextUI(newText)
|
||||
if currentTextUI ~= newText then
|
||||
if newText then
|
||||
lib.showTextUI(newText)
|
||||
else
|
||||
lib.hideTextUI()
|
||||
end
|
||||
currentTextUI = newText
|
||||
end
|
||||
end
|
||||
|
||||
-- Function to get floor menu options
|
||||
-- @returns table - Menu options for available floors
|
||||
function getFloorMenu()
|
||||
local options = {}
|
||||
local currentFloor = GlobalState.elevator.currentFloor
|
||||
|
||||
-- If elevator is moving, show disabled option
|
||||
if GlobalState.elevator.isMoving then
|
||||
return {
|
||||
{
|
||||
title = Config.Messages.elevatorMoving,
|
||||
disabled = true
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- Create options for each floor
|
||||
for floor, floorData in ipairs(Config.Elevator.floors) do
|
||||
-- Don't show current floor as an option
|
||||
if floor ~= currentFloor then
|
||||
table.insert(options, {
|
||||
title = floorData.label,
|
||||
description = floorData.description,
|
||||
icon = 'building',
|
||||
onSelect = function()
|
||||
SelectFloor(floor,currentFloor) -- Execute this function to select the floor (this move the elevator and plays the animation)
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return options
|
||||
end
|
||||
|
||||
-- Inside elevator zone
|
||||
-- This zone handles all interactions when player is inside the elevator
|
||||
local insideZone = lib.zones.box({
|
||||
-- Zone position and size from config
|
||||
coords = Config.Elevator.insideZone.coords,
|
||||
size = Config.Elevator.insideZone.size,
|
||||
rotation = Config.Elevator.insideZone.rotation,
|
||||
|
||||
-- Called when player enters elevator
|
||||
onEnter = function()
|
||||
isInsideElevator = true
|
||||
SetInteriorProbeLength(50.0) -- Prevents texture loss in interior (CRITICAL, MAKE SURE TO KEEP THIS)
|
||||
end,
|
||||
|
||||
-- Called when player exits elevator
|
||||
onExit = function()
|
||||
isInsideElevator = false
|
||||
updateTextUI(nil) -- Hide any UI text
|
||||
SetInteriorProbeLength(0.0) -- Reset interior probe length
|
||||
end,
|
||||
|
||||
-- Called every frame while player is inside elevator
|
||||
inside = function()
|
||||
-- Only allow floor selection if elevator is not moving
|
||||
if not GlobalState.elevator.isMoving then
|
||||
-- Show floor selection prompt
|
||||
updateTextUI('[E] ' .. Config.Messages.selectFloor)
|
||||
|
||||
-- Check if player pressed the interaction key (E)
|
||||
if IsControlJustPressed(0, 38) then
|
||||
-- Register and show the floor selection menu
|
||||
lib.registerContext({
|
||||
id = 'elevator_floor_menu',
|
||||
title = Config.Messages.elevatorTitle,
|
||||
options = getFloorMenu() -- Get available floor options
|
||||
})
|
||||
lib.showContext('elevator_floor_menu')
|
||||
end
|
||||
else
|
||||
updateTextUI(nil) -- Hide UI text while elevator is moving
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Elevator call zone
|
||||
-- This zone handles calling the elevator from outside
|
||||
local callZone = lib.zones.box({
|
||||
-- Zone position and size from config
|
||||
coords = Config.Elevator.callZone.coords,
|
||||
size = Config.Elevator.callZone.size,
|
||||
rotation = Config.Elevator.callZone.rotation,
|
||||
|
||||
-- Called when player exits the call zone
|
||||
onExit = function()
|
||||
updateTextUI(nil) -- Hide any UI text
|
||||
end,
|
||||
|
||||
-- Called every frame while player is in call zone
|
||||
inside = function()
|
||||
local state = GlobalState.elevator
|
||||
|
||||
-- Show "elevator moving" text if elevator is in motion
|
||||
if state.isMoving then
|
||||
updateTextUI(Config.Messages.elevatorMoving)
|
||||
else
|
||||
-- Get player position and nearest floor
|
||||
local playerCoords = GetEntityCoords(cache.ped)
|
||||
local nearestFloor = getNearestFloor(playerCoords.z)
|
||||
|
||||
-- Only show call prompt if elevator is on a different floor
|
||||
if nearestFloor ~= state.currentFloor then
|
||||
updateTextUI('[E] ' .. Config.Messages.callElevator)
|
||||
|
||||
-- Check if player pressed interaction key and is not inside elevator
|
||||
if IsControlJustPressed(0, 38) and not isInsideElevator then
|
||||
CallElevator(playerCoords,nearestFloor) -- Call elevator to player's floor
|
||||
end
|
||||
else
|
||||
updateTextUI(nil) -- Hide UI text if elevator is already on this floor
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/client/utils.lua
Normal file
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/client/utils.lua
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,84 @@
|
|||
<timecycle_modifier_data version="1.000000">
|
||||
<modifier name="prompt_sandy_cityhall_closedroom" numMods="25" userFlags="0">
|
||||
<light_artificial_int_down_intensity>0.000 0.000</light_artificial_int_down_intensity>
|
||||
<light_artificial_int_up_col_r>1.697 1.000</light_artificial_int_up_col_r>
|
||||
<light_artificial_int_up_col_g>1.179 1.000</light_artificial_int_up_col_g>
|
||||
<light_artificial_int_up_intensity>0.540 0.000</light_artificial_int_up_intensity>
|
||||
<ssao_inten>5.000 0.000</ssao_inten>
|
||||
<postfx_exposure>0.520 0.000</postfx_exposure>
|
||||
<postfx_bright_pass_thresh_width>0.700 0.000</postfx_bright_pass_thresh_width>
|
||||
<postfx_bright_pass_thresh>0.600 0.000</postfx_bright_pass_thresh>
|
||||
<postfx_desaturation>1.200 0.000</postfx_desaturation>
|
||||
<postfx_tonemap_filmic_override_dark>-1.000 0.000</postfx_tonemap_filmic_override_dark>
|
||||
<postfx_tonemap_filmic_exposure_dark>0.000 0.000</postfx_tonemap_filmic_exposure_dark>
|
||||
<postfx_tonemap_filmic_override_bright>-1.000 0.000</postfx_tonemap_filmic_override_bright>
|
||||
<postfx_tonemap_filmic_exposure_bright>2.100 0.000</postfx_tonemap_filmic_exposure_bright>
|
||||
<postfx_motionblurlength>0.500 0.000</postfx_motionblurlength>
|
||||
<lens_artefacts_intensity>0.100 0.000</lens_artefacts_intensity>
|
||||
<fog_start>215.350 73.000</fog_start>
|
||||
<reflection_lod_range_start>0.000 0.000</reflection_lod_range_start>
|
||||
<reflection_lod_range_end>0.000 0.000</reflection_lod_range_end>
|
||||
<reflection_slod_range_start>0.000 0.000</reflection_slod_range_start>
|
||||
<reflection_slod_range_end>0.000 0.000</reflection_slod_range_end>
|
||||
<far_clip>300.000 300.000</far_clip>
|
||||
<temperature>20.000 0.000</temperature>
|
||||
<natural_ambient_multiplier>0.000 0.000</natural_ambient_multiplier>
|
||||
<artificial_int_ambient_multiplier>1.000 0.000</artificial_int_ambient_multiplier>
|
||||
<shadow_distance_mult>0.100 0.000</shadow_distance_mult>
|
||||
</modifier>
|
||||
<modifier name="prompt_sandy_cityhall_exterior_access" numMods="21" userFlags="0">
|
||||
<light_artificial_int_down_intensity>0.000 0.000</light_artificial_int_down_intensity>
|
||||
<light_artificial_int_up_col_r>1.697 1.000</light_artificial_int_up_col_r>
|
||||
<light_artificial_int_up_col_g>1.221 1.000</light_artificial_int_up_col_g>
|
||||
<light_artificial_int_up_intensity>0.500 0.000</light_artificial_int_up_intensity>
|
||||
<ssao_inten>5.000 0.000</ssao_inten>
|
||||
<postfx_bright_pass_thresh_width>0.700 0.000</postfx_bright_pass_thresh_width>
|
||||
<postfx_bright_pass_thresh>0.600 0.000</postfx_bright_pass_thresh>
|
||||
<postfx_desaturation>1.130 0.000</postfx_desaturation>
|
||||
<postfx_tonemap_filmic_override_dark>-1.000 0.000</postfx_tonemap_filmic_override_dark>
|
||||
<postfx_tonemap_filmic_exposure_dark>0.000 0.000</postfx_tonemap_filmic_exposure_dark>
|
||||
<postfx_tonemap_filmic_override_bright>-1.000 0.000</postfx_tonemap_filmic_override_bright>
|
||||
<postfx_tonemap_filmic_exposure_bright>2.600 0.000</postfx_tonemap_filmic_exposure_bright>
|
||||
<lens_artefacts_intensity>0.100 0.000</lens_artefacts_intensity>
|
||||
<fog_start>693.500 73.000</fog_start>
|
||||
<reflection_lod_range_start>0.000 0.000</reflection_lod_range_start>
|
||||
<reflection_lod_range_end>0.000 0.000</reflection_lod_range_end>
|
||||
<reflection_slod_range_start>0.000 0.000</reflection_slod_range_start>
|
||||
<reflection_slod_range_end>0.000 0.000</reflection_slod_range_end>
|
||||
<temperature>20.000 0.000</temperature>
|
||||
<natural_ambient_multiplier>0.000 0.000</natural_ambient_multiplier>
|
||||
<artificial_int_ambient_multiplier>1.000 0.000</artificial_int_ambient_multiplier>
|
||||
</modifier>
|
||||
<modifier name="prompt_sandy_cityhall_blueroom" numMods="30" userFlags="0">
|
||||
<light_artificial_int_down_intensity>0.000 0.000</light_artificial_int_down_intensity>
|
||||
<light_artificial_int_up_col_r>1.697 1.000</light_artificial_int_up_col_r>
|
||||
<light_artificial_int_up_col_g>1.221 1.000</light_artificial_int_up_col_g>
|
||||
<light_artificial_int_up_intensity>0.500 0.000</light_artificial_int_up_intensity>
|
||||
<ssao_inten>5.000 0.000</ssao_inten>
|
||||
<postfx_bright_pass_thresh_width>0.700 0.000</postfx_bright_pass_thresh_width>
|
||||
<postfx_bright_pass_thresh>0.600 0.000</postfx_bright_pass_thresh>
|
||||
<postfx_desaturation>1.130 0.000</postfx_desaturation>
|
||||
<postfx_tonemap_filmic_override_dark>-1.000 0.000</postfx_tonemap_filmic_override_dark>
|
||||
<postfx_tonemap_filmic_exposure_dark>0.000 0.000</postfx_tonemap_filmic_exposure_dark>
|
||||
<postfx_tonemap_filmic_override_bright>-1.000 0.000</postfx_tonemap_filmic_override_bright>
|
||||
<postfx_tonemap_filmic_exposure_bright>2.600 0.000</postfx_tonemap_filmic_exposure_bright>
|
||||
<postfx_motionblurlength>0.500 0.000</postfx_motionblurlength>
|
||||
<lens_artefacts_intensity>0.100 0.000</lens_artefacts_intensity>
|
||||
<fog_start>215.350 73.000</fog_start>
|
||||
<reflection_lod_range_start>0.000 0.000</reflection_lod_range_start>
|
||||
<reflection_lod_range_end>0.000 0.000</reflection_lod_range_end>
|
||||
<reflection_slod_range_start>0.000 0.000</reflection_slod_range_start>
|
||||
<reflection_slod_range_end>0.000 0.000</reflection_slod_range_end>
|
||||
<far_clip>300.000 300.000</far_clip>
|
||||
<temperature>20.000 0.000</temperature>
|
||||
<natural_ambient_multiplier>0.000 0.000</natural_ambient_multiplier>
|
||||
<artificial_int_ambient_multiplier>1.000 0.000</artificial_int_ambient_multiplier>
|
||||
<shadow_distance_mult>0.100 0.000</shadow_distance_mult>
|
||||
<lod_mult_hd>0.700 0.000</lod_mult_hd>
|
||||
<lod_mult_lod>0.700 0.000</lod_mult_lod>
|
||||
<lod_mult_slod1>0.700 0.000</lod_mult_slod1>
|
||||
<lod_mult_slod2>0.700 0.000</lod_mult_slod2>
|
||||
<lod_mult_slod3>0.700 0.000</lod_mult_slod3>
|
||||
<lod_mult_slod4>0.700 0.000</lod_mult_slod4>
|
||||
</modifier>
|
||||
</timecycle_modifier_data>
|
Binary file not shown.
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dat54>
|
||||
<Version value="7314721" />
|
||||
<ContainerPaths>
|
||||
<Item>audiodirectory\custom_sounds</Item>
|
||||
</ContainerPaths>
|
||||
<Items>
|
||||
<!-- SimpleSounds -->
|
||||
<Item type="SimpleSound">
|
||||
<Name>bell_98033</Name>
|
||||
<Header>
|
||||
<Flags value="0x00008004" />
|
||||
<Volume value="200" />
|
||||
<Category>scripted</Category>
|
||||
</Header>
|
||||
<ContainerName>audiodirectory/custom_sounds</ContainerName>
|
||||
<FileName>bell_98033</FileName>
|
||||
<WaveSlotNum value="0" />
|
||||
</Item>
|
||||
|
||||
<!-- SoundSets !-->
|
||||
<Item type="SoundSet">
|
||||
<Name>special_soundset</Name>
|
||||
<Header>
|
||||
<Flags value="0xAAAAAAAA" />
|
||||
</Header>
|
||||
<SoundSets>
|
||||
<Item>
|
||||
<ScriptName>elevator_bell</ScriptName>
|
||||
<ChildSound>bell_98033</ChildSound>
|
||||
</Item>
|
||||
</SoundSets>
|
||||
</Item>
|
||||
</Items>
|
||||
</Dat54>
|
60
resources/[defaultmaps]/prompt_sandy_cityhall/fxmanifest.lua
Normal file
60
resources/[defaultmaps]/prompt_sandy_cityhall/fxmanifest.lua
Normal file
|
@ -0,0 +1,60 @@
|
|||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
author 'Prompt Studio & Infames Dev'
|
||||
version '1.1.2'
|
||||
this_is_a_map 'yes'
|
||||
description 'Sandy Shores City Hall'
|
||||
|
||||
|
||||
files {
|
||||
'd1n_shc_timecycle.xml',
|
||||
'd1n_sch_audio_game.dat151.rel',
|
||||
'stream/interior/3015184349.ymt',
|
||||
'data/audioexample_sounds.dat54.rel',
|
||||
'audiodirectory/custom_sounds.awc',
|
||||
'stream/interior/unlocked/ytyp/d1n_sch_props.ytyp',
|
||||
'stream/interior/unlocked/ytyp/d1n_sch_ytyp.ytyp'
|
||||
}
|
||||
|
||||
|
||||
data_file 'AUDIO_GAMEDATA' 'd1n_sch_audio_game.dat'
|
||||
data_file 'TIMECYCLEMOD_FILE' 'd1n_shc_timecycle.xml'
|
||||
data_file 'AUDIO_WAVEPACK' 'audiodirectory'
|
||||
data_file 'AUDIO_SOUNDDATA' 'data/audioexample_sounds.dat'
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/interior/unlocked/ytyp/d1n_sch_props.ytyp'
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/interior/unlocked/ytyp/d1n_sch_ytyp.ytyp'
|
||||
|
||||
|
||||
escrow_ignore {
|
||||
'stream/exterior/unlocked/**',
|
||||
'stream/interior/unlocked/**',
|
||||
'public_config.lua',
|
||||
'client/open.lua',
|
||||
'ipls_command.lua',
|
||||
'ipls_server.lua',
|
||||
}
|
||||
|
||||
-- scripts --
|
||||
lua54 'yes'
|
||||
|
||||
shared_scripts {
|
||||
'@ox_lib/init.lua',
|
||||
'public_config.lua',
|
||||
'internal_config.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'client/utils.lua',
|
||||
'client/open.lua',
|
||||
'client/client.lua',
|
||||
'ipls_command.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'sv_Tokens.lua',
|
||||
'sv_MapChainHandler.lua',
|
||||
'sv_MapVersionCheck.lua',
|
||||
'server/*.lua',
|
||||
'ipls_server.lua'
|
||||
}
|
||||
dependency '/assetpacks'
|
Binary file not shown.
260
resources/[defaultmaps]/prompt_sandy_cityhall/ipls_command.lua
Normal file
260
resources/[defaultmaps]/prompt_sandy_cityhall/ipls_command.lua
Normal file
|
@ -0,0 +1,260 @@
|
|||
local InteriorId = GetInteriorAtCoords(1753.6223, 3804.6450, 35.4474)
|
||||
|
||||
-- Texto de los IPLS
|
||||
local IPL_LABELS = {
|
||||
["p_prompt_sandy_cityhall_fences_backopened"] = "Back Fences (Open)",
|
||||
["p_prompt_sandy_cityhall_backtables"] = "Back Tables",
|
||||
["p_prompt_sandy_cityhall_tables"] = "Tables",
|
||||
["p_prompt_sandy_cityhall_coffin_closed"] = "Coffin (Closed)",
|
||||
["p_prompt_sandy_cityhall_coffin_opened"] = "Coffin (Open)",
|
||||
["p_prompt_sandy_cityhall_fences_backclosed"] = "Back Fences (Closed)",
|
||||
["p_prompt_sandy_cityhall_funeral_chairs"] = "Funeral Chairs",
|
||||
["p_prompt_sandy_cityhall_funeral_picture"] = "Funeral Picture",
|
||||
["p_prompt_sandy_cityhall_leaves"] = "Leaves",
|
||||
["p_prompt_sandy_cityhall_wedding_chairs"] = "Wedding Chairs",
|
||||
["p_prompt_sandy_cityhall_wedding_spotlight"] = "Wedding Spotlight",
|
||||
["p_prompt_sandy_cityhall_wedding_venue"] = "Wedding Venue",
|
||||
}
|
||||
|
||||
-- Configuraciones predefinidas para eventos
|
||||
local PRECONFIGURACIONES = {
|
||||
["Dinner (Opened Back)"] = {
|
||||
"p_prompt_sandy_cityhall_backtables",
|
||||
"p_prompt_sandy_cityhall_tables",
|
||||
"p_prompt_sandy_cityhall_fences_backopened"
|
||||
},
|
||||
["Dinner (Closed Back)"] = {
|
||||
"p_prompt_sandy_cityhall_tables",
|
||||
"p_prompt_sandy_cityhall_fences_backclosed"
|
||||
},
|
||||
["Wedding Ceremony"] = {
|
||||
"p_prompt_sandy_cityhall_fences_backclosed",
|
||||
"p_prompt_sandy_cityhall_wedding_chairs",
|
||||
"p_prompt_sandy_cityhall_wedding_spotlight",
|
||||
"p_prompt_sandy_cityhall_wedding_venue",
|
||||
"p_prompt_sandy_cityhall_leaves"
|
||||
},
|
||||
["Funeral"] = {
|
||||
"p_prompt_sandy_cityhall_fences_backclosed",
|
||||
"p_prompt_sandy_cityhall_funeral_chairs",
|
||||
"p_prompt_sandy_cityhall_funeral_picture",
|
||||
"p_prompt_sandy_cityhall_leaves",
|
||||
"p_prompt_sandy_cityhall_coffin_closed"
|
||||
},
|
||||
}
|
||||
|
||||
-- Textos de los Entity Sets
|
||||
local ENTITY_SET_LABELS = {
|
||||
["static_elevator"] = "Static Elevator",
|
||||
["conference_chairs"] = "Conference Chairs",
|
||||
["conference_meeting_table"] = "Meeting Table",
|
||||
["eventroom_voting"] = "Voting Room"
|
||||
}
|
||||
|
||||
-- Declaración anticipada de las funciones de menú
|
||||
local showMainMenu, showManualMenu, showPreconfiguradoMenu, showEntitySetsMenu
|
||||
|
||||
-- Función para alternar (activar/desactivar) un IPL
|
||||
local function toggleIPL(ipl, menuCallback)
|
||||
local currentState = IsIplActive(ipl)
|
||||
TriggerServerEvent('ipls:sync:toggleIPL', ipl, not currentState)
|
||||
-- Pequeño delay para dar tiempo a que se aplique el cambio
|
||||
SetTimeout(100, function()
|
||||
menuCallback()
|
||||
end)
|
||||
end
|
||||
|
||||
-- Función para alternar (activar/desactivar) un Entity Set
|
||||
local function toggleEntitySet(entitySet)
|
||||
local currentState = IsInteriorEntitySetActive(InteriorId, entitySet)
|
||||
TriggerServerEvent('ipls:sync:toggleEntitySet', entitySet, not currentState)
|
||||
-- Pequeño delay para dar tiempo a que se aplique el cambio
|
||||
SetTimeout(100, function()
|
||||
showEntitySetsMenu()
|
||||
end)
|
||||
end
|
||||
|
||||
-- Función para retornar un icono basado en el estado activo/inactivo
|
||||
local function getIcon(state)
|
||||
return state and 'fas fa-check' or 'fas fa-times'
|
||||
end
|
||||
|
||||
-- Función para verificar si una configuración está completamente activa
|
||||
local function isConfigurationActive(listaIPLS)
|
||||
for _, ipl in ipairs(listaIPLS) do
|
||||
if not IsIplActive(ipl) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- Menú de activación manual de cada IPL
|
||||
showManualMenu = function()
|
||||
local menuOptions = {}
|
||||
|
||||
for ipl, label in pairs(IPL_LABELS) do
|
||||
local isActive = IsIplActive(ipl)
|
||||
table.insert(menuOptions, {
|
||||
title = label,
|
||||
icon = getIcon(isActive),
|
||||
description = isActive and "Enabled" or "Disabled",
|
||||
onSelect = function()
|
||||
toggleIPL(ipl, showManualMenu)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
lib.registerContext({
|
||||
id = 'ipls_manual_menu',
|
||||
title = 'IPLS - Manual',
|
||||
menu = 'ipls_main_menu',
|
||||
onBack = function()
|
||||
showMainMenu()
|
||||
end,
|
||||
options = menuOptions,
|
||||
})
|
||||
|
||||
lib.showContext('ipls_manual_menu')
|
||||
end
|
||||
|
||||
-- Menú de Entity Sets
|
||||
showEntitySetsMenu = function()
|
||||
local menuOptions = {}
|
||||
|
||||
for entitySet, label in pairs(ENTITY_SET_LABELS) do
|
||||
local isActive = IsInteriorEntitySetActive(InteriorId, entitySet)
|
||||
table.insert(menuOptions, {
|
||||
title = label,
|
||||
icon = getIcon(isActive),
|
||||
description = isActive and "Enabled" or "Disabled",
|
||||
onSelect = function()
|
||||
toggleEntitySet(entitySet)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
lib.registerContext({
|
||||
id = 'entity_sets_menu',
|
||||
title = 'Entity Sets',
|
||||
menu = 'ipls_main_menu',
|
||||
onBack = function()
|
||||
showMainMenu()
|
||||
end,
|
||||
options = menuOptions,
|
||||
})
|
||||
|
||||
lib.showContext('entity_sets_menu')
|
||||
end
|
||||
|
||||
-- Menú de configuraciones preestablecidas
|
||||
showPreconfiguradoMenu = function()
|
||||
local menuOptions = {}
|
||||
|
||||
for grupo, listaIPLS in pairs(PRECONFIGURACIONES) do
|
||||
local isActive = isConfigurationActive(listaIPLS)
|
||||
table.insert(menuOptions, {
|
||||
title = grupo,
|
||||
icon = getIcon(isActive),
|
||||
description = isActive and "Configuration active" or "Configuration inactive",
|
||||
onSelect = function()
|
||||
local activar = false
|
||||
for _, ipl in ipairs(listaIPLS) do
|
||||
if not IsIplActive(ipl) then
|
||||
activar = true
|
||||
break
|
||||
end
|
||||
end
|
||||
for _, ipl in ipairs(listaIPLS) do
|
||||
if activar and not IsIplActive(ipl) then
|
||||
toggleIPL(ipl, showPreconfiguradoMenu)
|
||||
elseif (not activar) and IsIplActive(ipl) then
|
||||
toggleIPL(ipl, showPreconfiguradoMenu)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
lib.registerContext({
|
||||
id = 'ipls_preconfigurado_menu',
|
||||
title = 'IPLS - Presets',
|
||||
menu = 'ipls_main_menu',
|
||||
onBack = function()
|
||||
showMainMenu()
|
||||
end,
|
||||
options = menuOptions,
|
||||
})
|
||||
|
||||
lib.showContext('ipls_preconfigurado_menu')
|
||||
end
|
||||
|
||||
-- Menú principal
|
||||
showMainMenu = function()
|
||||
lib.registerContext({
|
||||
id = 'ipls_main_menu',
|
||||
title = 'IPLS Manager',
|
||||
options = {
|
||||
{
|
||||
title = 'Presets',
|
||||
icon = 'fas fa-list',
|
||||
onSelect = function()
|
||||
showPreconfiguradoMenu()
|
||||
end
|
||||
},
|
||||
{
|
||||
title = 'Manual',
|
||||
icon = 'fas fa-wrench',
|
||||
onSelect = function()
|
||||
showManualMenu()
|
||||
end
|
||||
},
|
||||
{
|
||||
title = 'Entity Sets',
|
||||
icon = 'fas fa-cube',
|
||||
onSelect = function()
|
||||
showEntitySetsMenu()
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
lib.showContext('ipls_main_menu')
|
||||
end
|
||||
|
||||
-- Registro del comando '/cityhall' para abrir el menú
|
||||
RegisterCommand("cityhall", function()
|
||||
showMainMenu()
|
||||
end, false)
|
||||
|
||||
-- También se puede registrar un evento para abrir el menú desde otro recurso
|
||||
RegisterNetEvent("ipls:openMenu", function()
|
||||
showMainMenu()
|
||||
end)
|
||||
|
||||
-- Handlers para GlobalState
|
||||
AddStateBagChangeHandler('ipls', 'global', function(bagName, key, value)
|
||||
if value then
|
||||
for ipl, state in pairs(value) do
|
||||
if state then
|
||||
RequestIpl(ipl)
|
||||
else
|
||||
RemoveIpl(ipl)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddStateBagChangeHandler('entitySets', 'global', function(bagName, key, value)
|
||||
if value then
|
||||
for entitySet, state in pairs(value) do
|
||||
if state then
|
||||
ActivateInteriorEntitySet(InteriorId, entitySet)
|
||||
RefreshInterior(InteriorId)
|
||||
else
|
||||
DeactivateInteriorEntitySet(InteriorId, entitySet)
|
||||
RefreshInterior(InteriorId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
|
@ -0,0 +1,43 @@
|
|||
-- Inicializar estados en GlobalState
|
||||
CreateThread(function()
|
||||
-- IPLs
|
||||
if not GlobalState.ipls then
|
||||
GlobalState.ipls = {
|
||||
p_prompt_sandy_cityhall_fences_backopened = false,
|
||||
p_prompt_sandy_cityhall_backtables = false,
|
||||
p_prompt_sandy_cityhall_tables = false,
|
||||
p_prompt_sandy_cityhall_coffin_closed = false,
|
||||
p_prompt_sandy_cityhall_coffin_opened = false,
|
||||
p_prompt_sandy_cityhall_fences_backclosed = false,
|
||||
p_prompt_sandy_cityhall_funeral_chairs = false,
|
||||
p_prompt_sandy_cityhall_funeral_picture = false,
|
||||
p_prompt_sandy_cityhall_leaves = false,
|
||||
p_prompt_sandy_cityhall_wedding_chairs = false,
|
||||
p_prompt_sandy_cityhall_wedding_spotlight = false,
|
||||
p_prompt_sandy_cityhall_wedding_venue = false
|
||||
}
|
||||
end
|
||||
|
||||
-- Entity Sets
|
||||
if not GlobalState.entitySets then
|
||||
GlobalState.entitySets = {
|
||||
static_elevator = false,
|
||||
conference_chairs = false,
|
||||
conference_meeting_table = false,
|
||||
eventroom_voting = false
|
||||
}
|
||||
end
|
||||
end)
|
||||
|
||||
-- Event handlers para actualizar GlobalState
|
||||
RegisterNetEvent('ipls:sync:toggleIPL', function(ipl, state)
|
||||
local ipls = GlobalState.ipls
|
||||
ipls[ipl] = state
|
||||
GlobalState.ipls = ipls
|
||||
end)
|
||||
|
||||
RegisterNetEvent('ipls:sync:toggleEntitySet', function(entitySet, state)
|
||||
local entitySets = GlobalState.entitySets
|
||||
entitySets[entitySet] = state
|
||||
GlobalState.entitySets = entitySets
|
||||
end)
|
|
@ -0,0 +1,30 @@
|
|||
Config = {
|
||||
|
||||
FunctionalElevator = true, --[[
|
||||
If you dont want the elevator to be functional, set this to false
|
||||
(why in this world anyone would want to disable this?)
|
||||
|
||||
If this is set to false, an entityset will be spawned in every floor.
|
||||
]]
|
||||
|
||||
EnablePlayerAnimations = true, --[[
|
||||
If you dont want the player to animate when calling the elevator or close/open the doors, set this to false
|
||||
]]
|
||||
|
||||
Messages = {
|
||||
elevatorMoving = "The elevator is moving",
|
||||
wrongFloor = "Invalid floor",
|
||||
noAccess = "You don't have access to this elevator",
|
||||
floorReached = "You have arrived at floor %s",
|
||||
waitingForElevator = "Waiting for elevator...",
|
||||
selectFloor = "Select Floor",
|
||||
elevatorTitle = "Elevator Control",
|
||||
callElevator = "Call elevator",
|
||||
|
||||
floors = {
|
||||
firstFloor = "First Floor",
|
||||
secondFloor = "Second Floor",
|
||||
thirdFloor = "Third Floor"
|
||||
}
|
||||
}
|
||||
}
|
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/server/server.lua
Normal file
BIN
resources/[defaultmaps]/prompt_sandy_cityhall/server/server.lua
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue