This commit is contained in:
Hawk 2024-12-30 11:27:33 +01:00
parent d0911bf62c
commit c6fda13281
No known key found for this signature in database
GPG Key ID: 2890D5366F8BAC14
82 changed files with 3917 additions and 3008 deletions

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Bob74
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,4 +1,4 @@
# Fix holes and customize the map (Updated to The Criminal Enterprises DLC)
# Fix holes and customize the map (Updated to Agents of Sabotage DLC)
The purpose of this script is to fix the holes in the map by loading zones that arent loaded by default. Ive added quite a lot of places to load, based on [Mikeehs script](https://forum.fivem.net/t/release-load-unloaded-ipls/5911). If you just want to fix the holes in the map, then use this resource as provided.
@ -30,6 +30,57 @@ This resource has been completely rewritten from scratch since v2.0. You can cus
(DD/MM/YYYY)
---
27/12/2024 - 2.4.0
- Added "Agents of Sabotage" support
- Fixed Eclipse Boulevard Garage tint colors (@DevSekai)
28/08/2024 - 2.3.3
- Fixed door on cargo ship (@NeenGame)
- Fixed Franklin interior (@NeenGame)
24/08/2024 - 2.3.2
- Added Kosatka and "The Music Locker" interiors
- Removed `Citizen` prefix from code
10/08/2024 - 2.3.1
- Fix world not rendering when inside security offices
- Fix typos in "Los Santos Tuners" files
02/07/2024 - 2.3.0
- Added "Bottom Dollar Bounties" support
14/04/2024 - 2.2.1
- Allow disabling San Andreas Mercenaries fixes
- Allow setting base game cargo ship as sunk
- Rename `ChopShopSalvage.Ipl.Load()` to `ChopShopSalvage.Ipl.Exterior.Load()`
- Rename `DrugWarsFreakshop.Ipl.Load()` to `DrugWarsFreakshop.Ipl.Exterior.Load()`
- Rename `DrugWarsGarage.Ipl.Load()` to `DrugWarsGarage.Ipl.Exterior.Load()`
06/04/2024 - 2.2.0
- Added "Los Santos Drug Wars" support
- Added "San Andreas Mercenaries" support
- Added "The Chop Shop" support
- Added missing base IPLs
27/03/2024 - 2.1.4
- North Yankton improvements (https://github.com/Bob74/bob74_ipl/pull/131 @TheIndra55)
05/12/2023 - 2.1.3
- Added missing train track near Davis Quartz (https://github.com/Bob74/bob74_ipl/pull/129 @TheIndra55)
10/01/2023 - 2.1.2
- Fix native and update native names (@NeenGame)
24/10/2022 - 2.1.1
- Fix vespucci beach wall hole
- Fix Boat House Door in Sandy Shores
- Fix GTA 5 24/7 Roof in Sandy Shores
- Fix Industrial Building near Lesters Warehouse
- Fix Collision Holes near Lost MC compound
11/10/2022 - 2.1.0a
- Make Doomsday Facility Objects non network
03/08/2022 - 2.1.0
- Added "The Criminal Enterprises" support
@ -66,7 +117,7 @@ This resource has been completely rewritten from scratch since v2.0. You can cus
19/07/2021 - 2.0.10
- Added Diamond Casino IPLs: Casino, Garage, VIP garage, Penthouse
- Import: Forced refresh of CEO Garages
- Updated fxmanifest fx_version to adamant
- Updated fxmanifest fx_version to cerulean
- Updated IPL list link in fxmanifest nad removed outdated Props list and Interior ID list
- Fixed export typo in `michael.lua`
- Removed unnecessary space in north_yankton IPL
@ -117,8 +168,8 @@ This resource has been completely rewritten from scratch since v2.0. You can cus
- Fixed gang members names using an old format
- Disabled the Mod shop from CEO garage 3 (ImportCEOGarage3) because it is overlapping with CEO office 3 (FinanceOffice3)
- 08/11/2018 - 2.0.3
Added biker gangs name, missions, and members pictures
08/11/2018 - 2.0.3
- Added biker gangs name, missions, and members pictures
- Added CEO office organizations name
05/11/2018 - 2.0.1
@ -150,3 +201,9 @@ Added biker gangs name, missions, and members pictures
14/06/2017
- Original release
</details>
## Contributors
<a href="https://github.com/Bob74/bob74_ipl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Bob74/bob74_ipl" />
</a>

View File

@ -1,4 +1,4 @@
Citizen.CreateThread(function()
CreateThread(function()
-- ====================================================================
-- =--------------------- [GTA V: Single player] ---------------------=
-- ====================================================================
@ -25,7 +25,7 @@ Citizen.CreateThread(function()
BahamaMamas.Enable(true)
-- Pillbox hospital: 307.1680, -590.807, 43.280
-- PillboxHospital.Enable(false)
--PillboxHospital.Enable(true)
-- Zancudo Gates (GTAO like): -1600.30100000, 2806.73100000, 18.79683000
ZancudoGates.LoadDefault()
@ -34,6 +34,7 @@ Citizen.CreateThread(function()
Ammunations.LoadDefault()
LesterFactory.LoadDefault()
StripClub.LoadDefault()
CargoShip.LoadDefault()
Graffitis.Enable(true)
@ -144,6 +145,14 @@ Citizen.CreateThread(function()
DiamondPenthouse.LoadDefault() -- 976.636, 70.295, 115.164
end
-- ====================================================================
-- =-------------------- [DLC: Cayo Perico Heist] --------------------=
-- ====================================================================
if GetGameBuildNumber() >= 2189 then
CayoPericoNightclub.LoadDefault() -- 1550.0, 250.0, -50.0
CayoPericoSubmarine.LoadDefault() -- 1560.0, 400.0, -50.0
end
-- ====================================================================
-- =------------------- [DLC: Los Santos Tuners] ---------------------=
-- ====================================================================
@ -175,4 +184,49 @@ Citizen.CreateThread(function()
CriminalEnterpriseVehicleWarehouse.LoadDefault() -- 800.13696, -3001.4297, -65.14074
CriminalEnterpriseWarehouse.LoadDefault() -- 849.1047, -3000.209, -45.974354
end
-- ====================================================================
-- =------------------- [DLC: Los Santos Drug Wars] ------------------=
-- ====================================================================
if GetGameBuildNumber() >= 2802 then
DrugWarsFreakshop.LoadDefault() -- 570.9713, -420.0727, -70.000
DrugWarsGarage.LoadDefault() -- 519.2477, -2618.788, -50.000
DrugWarsLab.LoadDefault() -- 483.4252, -2625.071, -50.000
end
-- ====================================================================
-- =------------------- [DLC: San Andreas Mercenaries] ---------------=
-- ====================================================================
if GetGameBuildNumber() >= 2944 then
MercenariesClub.LoadDefault() -- 1202.407, -3251.251, -50.000
MercenariesLab.LoadDefault() -- -1916.119, 3749.719, -100.000
MercenariesFixes.LoadDefault()
end
-- ====================================================================
-- =------------------- [DLC: The Chop Shop] -------------------------=
-- ====================================================================
if GetGameBuildNumber() >= 3095 then
ChopShopCargoShip.LoadDefault() -- -344.4349, -4062.832, 17.000
ChopShopCartelGarage.LoadDefault() -- 1220.133, -2277.844, -50.000
ChopShopLifeguard.LoadDefault() -- -1488.153, -1021.166, 5.000
ChopShopSalvage.LoadDefault() -- 1077.276, -2274.876, -50.000
end
-- ====================================================================
-- =------------------ [DLC: Bottom Dollar Bounties] -----------------=
-- ====================================================================
if GetGameBuildNumber() >= 3258 then
SummerCarrier.LoadDefault() -- -3208.03, 3954.54, 14.0
SummerOffice.LoadDefault() -- 565.886, -2688.761, -50.0
end
-- ====================================================================
-- =-------------------- [DLC: Agents of Sabotage] -------------------=
-- ====================================================================
if GetGameBuildNumber() >= 3407 then
AgentsFactory.LoadDefault() -- 752.31, -997.24, -47.0
AgentsOffice.LoadDefault() -- 2149.71, 4787.76, -47.0
AgentsAirstrip.LoadDefault() -- -2106.98, 1468.31, 282.0
end
end)

View File

@ -259,7 +259,7 @@ AfterHoursNightclubs = {
Enable = function(trophy, state, color, refresh)
SetIplPropState(AfterHoursNightclubs.interiorId, trophy, state, refresh)
SetInteriorPropColor(AfterHoursNightclubs.interiorId, trophy, color)
SetInteriorEntitySetColor(AfterHoursNightclubs.interiorId, trophy, color)
end
},
DryIce = {
@ -287,11 +287,11 @@ AfterHoursNightclubs = {
if state then
RequestNamedPtfxAsset("scr_ba_club")
while not HasNamedPtfxAssetLoaded("scr_ba_club") do
Citizen.Wait(0)
Wait(0)
end
for key, emitter in pairs(AfterHoursNightclubs.Interior.DryIce.Emitters) do
UseParticleFxAssetNextCall("scr_ba_club")
UseParticleFxAsset("scr_ba_club")
StartParticleFxLoopedAtCoord("scr_ba_club_smoke_machine", emitter.pos.x, emitter.pos.y, emitter.pos.z, emitter.rot.x, emitter.rot.y, emitter.rot.z, AfterHoursNightclubs.Interior.DryIce.scale, false, false, false, true)
end
else

View File

@ -0,0 +1,21 @@
-- Airstrip: -2106.98, 1468.31, 282.0
exports("GetAgentsAirstrip", function()
return AgentsAirstrip
end)
AgentsAirstrip = {
Ipl = {
ipl = "m24_2_airstrip",
Load = function()
EnableIpl(AgentsAirstrip.Ipl.ipl, true)
end,
Remove = function()
EnableIpl(AgentsAirstrip.Ipl.ipl, false)
end
},
LoadDefault = function()
AgentsAirstrip.Ipl.Load()
end
}

View File

@ -0,0 +1,4 @@
CreateThread(function()
RequestIpl("m24_2_legacy_fixes")
RequestIpl("m24_2_mp2024_02_additions")
end)

View File

@ -0,0 +1,65 @@
-- Garment Factory: 752.31, -997.24, -47.0
exports("GetAgentsFactory", function()
return AgentsFactory
end)
AgentsFactory = {
interiorId = 297729,
Ipl = {
Exterior = {
ipl = "m24_2_garment_factory",
Load = function()
EnableIpl(AgentsFactory.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(AgentsFactory.Ipl.Exterior.ipl, false)
end
}
},
Trophy = {
egg = "set_pent_rob_egg",
idol01 = "set_pent_rob_idol_01",
idol02 = "set_pent_rob_idol_02",
scarab = "set_zanc_scarab",
drive = "set_whistle_drive",
plane = "set_cargo",
Enable = function(trophy, state, refresh)
SetIplPropState(AgentsFactory.interiorId, trophy, state, refresh)
end
},
Details = {
sonar = "set_sonar",
drive = "set_malware_drive",
controller = "set_rc_controller",
thermite = "set_thermal",
key = "set_smartkey",
drone = "set_pent_drone",
case = "set_pent_emp",
armor = "set_zanc_armor",
keycard = "set_zanc_keycard",
Enable = function(details, state, refresh)
SetIplPropState(AgentsFactory.interiorId, details, state, refresh)
end
},
LoadDefault = function()
-- Exterior
AgentsFactory.Ipl.Exterior.Load()
-- Interior
AgentsFactory.Trophy.Enable(AgentsFactory.Trophy.idol01, true, false)
AgentsFactory.Trophy.Enable(AgentsFactory.Trophy.idol02, true, false)
AgentsFactory.Details.Enable(AgentsFactory.Details.armor, true, false)
AgentsFactory.Details.Enable(AgentsFactory.Details.sonar, true, false)
AgentsFactory.Details.Enable(AgentsFactory.Details.drive, true, false)
RefreshInterior(AgentsFactory.interiorId)
end
}

View File

@ -0,0 +1,46 @@
-- McKenzie Field Hangar Office: 2149.71, 4787.76, -47.0
exports("GetAgentsOffice", function()
return AgentsOffice
end)
AgentsOffice = {
interiorId = 297985,
Style = {
bed = "set_bed",
mess = "collision_z9mhn5",
Set = function(style, refresh)
AgentsOffice.Style.Clear(refresh)
SetIplPropState(AgentsOffice.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(AgentsOffice.interiorId, {
AgentsOffice.Style.bed,
AgentsOffice.Style.mess
}, false, refresh)
end
},
Details = {
laptop = "set_laptop",
ammo = "set_ammo",
intel = "set_intel",
weapons = "set_weapons",
tools = "collision_9k04j35",
booze = "set_24_2",
Enable = function(details, state, refresh)
SetIplPropState(AgentsOffice.interiorId, details, state, refresh)
end
},
LoadDefault = function()
AgentsOffice.Style.Set(AgentsOffice.Style.bed, false)
AgentsOffice.Details.Enable(AgentsOffice.Details.laptop, true, false)
RefreshInterior(AgentsOffice.interiorId)
end
}

View File

@ -42,7 +42,7 @@ BikerClubhouse1 = {
BikerClubhouse1.Walls.Clear(false)
SetIplPropState(BikerClubhouse1.interiorId, walls, true, refresh)
SetInteriorPropColor(BikerClubhouse1.interiorId, walls, color)
SetInteriorEntitySetColor(BikerClubhouse1.interiorId, walls, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse1.interiorId, {
@ -63,7 +63,7 @@ BikerClubhouse1 = {
BikerClubhouse1.Furnitures.Clear(false)
SetIplPropState(BikerClubhouse1.interiorId, furn, true, refresh)
SetInteriorPropColor(BikerClubhouse1.interiorId, furn, color)
SetInteriorEntitySetColor(BikerClubhouse1.interiorId, furn, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse1.interiorId, {

View File

@ -41,7 +41,7 @@ BikerClubhouse2 = {
BikerClubhouse2.Walls.Clear(false)
SetIplPropState(BikerClubhouse2.interiorId, walls, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, walls, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, walls, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse2.interiorId, {
@ -55,7 +55,7 @@ BikerClubhouse2 = {
SetColor = function(color, refresh)
SetIplPropState(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, BikerClubhouse2.LowerWalls.default, color)
end,
},
Furnitures = {
@ -83,7 +83,7 @@ BikerClubhouse2 = {
BikerClubhouse2.Furnitures.Clear(false)
SetIplPropState(BikerClubhouse2.interiorId, furn, true, refresh)
SetInteriorPropColor(BikerClubhouse2.interiorId, furn, color)
SetInteriorEntitySetColor(BikerClubhouse2.interiorId, furn, color)
end,
Clear = function(refresh)
SetIplPropState(BikerClubhouse2.interiorId, {

View File

@ -199,10 +199,10 @@ BikerGang = {
local IsTextureDictLoaded = LoadStreamedTextureDict(member.textureDict)
if not IsTextureDictLoaded then
Citizen.Trace("ERROR: BikerClubhouseDrawMembers - Textures dictionnary \"" .. tostring(member.textureDict) .. "\" cannot be loaded.")
print("ERROR: BikerClubhouseDrawMembers - Textures dictionnary \"" .. tostring(member.textureDict) .. "\" cannot be loaded.")
end
else
Citizen.Trace("ERROR: BikerClubhouseDrawMembers - PedHeadShot not ready.")
print("ERROR: BikerClubhouseDrawMembers - PedHeadShot not ready.")
end
end,
Clear = function(member)
@ -245,7 +245,7 @@ BikerGang = {
ReleaseNamedRendertarget(GetHashKey(BikerGang.Clubhouse.ClubName.target))
end
if HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.ClubName.movieId) then
if HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.ClubName.movieId) then
SetScaleformMovieAsNoLongerNeeded(BikerGang.Clubhouse.ClubName.movieId)
end
@ -347,7 +347,7 @@ BikerGang = {
Init = function()
if not DrawEmptyRect(BikerGang.Clubhouse.MissionsWall.target, BikerGang.Clubhouse.MissionsWall.prop) then
Citizen.Trace("ERROR: BikerGang.Clubhouse.MissionsWall.Init() - DrawEmptyRect - Timeout")
print("ERROR: BikerGang.Clubhouse.MissionsWall.Init() - DrawEmptyRect - Timeout")
end
end,
Enable = function(state)
@ -356,25 +356,25 @@ BikerGang = {
SelectMission = function(position)
if BikerGang.Clubhouse.MissionsWall.movieId ~= -1 then
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "SET_SELECTED_MISSION")
PushScaleformMovieMethodParameterInt(position) -- Mission index 0 to 2 (-1 = no mission)
ScaleformMovieMethodAddParamInt(position) -- Mission index 0 to 2 (-1 = no mission)
EndScaleformMovieMethod()
end
end,
SetMission = function(position, title, desc, textDict, x, y)
if BikerGang.Clubhouse.MissionsWall.needToLoad then
if not HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
if not HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
BikerGang.Clubhouse.MissionsWall.movieId = LoadScaleform("BIKER_MISSION_WALL")
end
if BikerGang.Clubhouse.MissionsWall.movieId ~= -1 then
if position > -1 then
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "SET_MISSION")
PushScaleformMovieMethodParameterInt(position) -- Mission index 0 to 2 (-1 = no mission)
PushScaleformMovieMethodParameterString(title)
PushScaleformMovieMethodParameterString(desc)
PushScaleformMovieMethodParameterButtonName(textDict)
PushScaleformMovieMethodParameterFloat(x) -- Mission 0: world coordinates X
PushScaleformMovieMethodParameterFloat(y) -- Mission 0: world coordinates Y
ScaleformMovieMethodAddParamInt(position) -- Mission index 0 to 2 (-1 = no mission)
ScaleformMovieMethodAddParamTextureNameString(title)
ScaleformMovieMethodAddParamTextureNameString(desc)
ScaleformMovieMethodAddParamPlayerNameString(textDict)
ScaleformMovieMethodAddParamFloat(x) -- Mission 0: world coordinates X
ScaleformMovieMethodAddParamFloat(y) -- Mission 0: world coordinates Y
EndScaleformMovieMethod()
else
-- Remove all missions
@ -389,7 +389,7 @@ BikerGang = {
end,
RemoveMission = function(position)
BeginScaleformMovieMethod(BikerGang.Clubhouse.MissionsWall.movieId, "HIDE_MISSION")
PushScaleformMovieMethodParameterInt(position)
ScaleformMovieMethodAddParamInt(position)
EndScaleformMovieMethod()
end,
Clear = function()
@ -402,7 +402,7 @@ BikerGang = {
ReleaseNamedRendertarget(GetHashKey(BikerGang.Clubhouse.MissionsWall.prop))
end
if HasNamedScaleformMovieLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
if HasScaleformMovieFilenameLoaded(BikerGang.Clubhouse.MissionsWall.movieId) then
SetScaleformMovieAsNoLongerNeeded(BikerGang.Clubhouse.MissionsWall.movieId)
end
@ -433,7 +433,7 @@ BikerGang = {
}
}
Citizen.CreateThread(function()
CreateThread(function()
-- Removing the black texture
BikerGang.Clubhouse.Members.President.Init()
BikerGang.Clubhouse.Members.VicePresident.Init()
@ -492,14 +492,14 @@ Citizen.CreateThread(function()
end
end
Citizen.Wait(0) -- We need to call all this every frame
Wait(0) -- We need to call all this every frame
else
-- Not in a clubhouse
Citizen.Wait(1000)
Wait(1000)
end
else
-- No load needed
Citizen.Wait(1000)
Wait(1000)
end
end
end)
@ -549,7 +549,7 @@ function DrawEmblem(texturesDict, rotation)
local IsTextureDictLoaded = LoadStreamedTextureDict(texturesDict)
if not IsTextureDictLoaded then
Citizen.Trace("ERROR: DrawEmblem - Textures dictionnary cannot be loaded.")
print("ERROR: DrawEmblem - Textures dictionnary cannot be loaded.")
end
BikerGang.Clubhouse.Emblem.stage = 1

View File

@ -0,0 +1,3 @@
CreateThread(function()
RequestIpl("h4_ch2_mansion_final")
end)

View File

@ -0,0 +1,207 @@
-- The Music Locker: 1550.0, 250.0, -50.0
exports('GetCayoPericoNightclub', function()
return CayoPericoNightclub
end)
CayoPericoNightclub = {
interiorId = 281089,
Ipl = {
Posters = {
palmstraxx = "h4_clubposter_palmstraxx",
moodymann = "h4_clubposter_moodymann",
keinemusik = "h4_clubposter_keinemusik",
Enable = function(poster, state)
EnableIpl(poster, state)
end
}
},
Security = {
security = "int01_ba_security_upgrade",
Enable = function(state, refresh)
SetIplPropState(CayoPericoNightclub.interiorId, CayoPericoNightclub.Security.security, state, refresh)
end
},
Speakers = {
basic = "int01_ba_equipment_setup",
upgrade = {
"int01_ba_equipment_setup",
"int01_ba_equipment_upgrade"
},
Set = function(speakers, refresh)
CayoPericoNightclub.Speakers.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, speakers, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoNightclub.interiorId, {
CayoPericoNightclub.Speakers.basic,
CayoPericoNightclub.Speakers.upgrade
}, false, refresh)
end
},
Podium = {
podium = "int01_ba_style02_podium",
Enable = function(state, refresh)
SetIplPropState(CayoPericoNightclub.interiorId, CayoPericoNightclub.Podium.podium, state, refresh)
end
},
Turntables = {
style01 = "int01_ba_dj01",
style02 = "int01_ba_dj02",
style03 = "int01_ba_dj03",
style04 = "int01_ba_dj04",
style05 = "int01_ba_dj_palms_trax",
style06 = "int01_ba_dj_keinemusik",
style07 = "int01_ba_dj_moodyman",
Set = function(style, refresh)
CayoPericoNightclub.Turntables.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, style, true, refresh)
end,
Clear = function(refresh)
for key, value in pairs(CayoPericoNightclub.Turntables) do
if type(value) == "string" then
SetIplPropState(CayoPericoNightclub.interiorId, value, false, refresh)
end
end
end
},
Bar = {
bar = "int01_ba_bar_content",
Enable = function(state, refresh)
SetIplPropState(CayoPericoNightclub.interiorId, CayoPericoNightclub.Bar.bar, state, refresh)
end
},
Screen = {
front = "int01_ba_lights_screen",
back = "int01_ba_screen",
Enable = function(screen, state, refresh)
SetIplPropState(CayoPericoNightclub.interiorId, screen, state, refresh)
end
},
Lights = {
Droplets = {
style01 = "dj_01_lights_01",
style02 = "dj_02_lights_01",
style03 = "dj_03_lights_01",
style04 = "dj_04_lights_01",
Set = function(lights, refresh)
CayoPericoNightclub.Lights.Droplets.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, lights, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoNightclub.interiorId, {
CayoPericoNightclub.Lights.Droplets.style01,
CayoPericoNightclub.Lights.Droplets.style02,
CayoPericoNightclub.Lights.Droplets.style03,
CayoPericoNightclub.Lights.Droplets.style04
}, false, refresh)
end
},
Neons = {
style01 = "dj_01_lights_02",
style02 = "dj_02_lights_02",
style03 = "dj_03_lights_02",
style04 = "dj_04_lights_02",
Set = function(lights, refresh)
CayoPericoNightclub.Lights.Neons.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, lights, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoNightclub.interiorId, {
CayoPericoNightclub.Lights.Neons.style01,
CayoPericoNightclub.Lights.Neons.style02,
CayoPericoNightclub.Lights.Neons.style03,
CayoPericoNightclub.Lights.Neons.style04
}, false, refresh)
end
},
Bands = {
style01 = "dj_01_lights_03",
style02 = "dj_02_lights_03",
style03 = "dj_03_lights_03",
style04 = "dj_04_lights_03",
Set = function(lights, refresh)
CayoPericoNightclub.Lights.Bands.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, lights, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoNightclub.interiorId, {
CayoPericoNightclub.Lights.Bands.style01,
CayoPericoNightclub.Lights.Bands.style02,
CayoPericoNightclub.Lights.Bands.style03,
CayoPericoNightclub.Lights.Bands.style04
}, false, refresh)
end
},
Lasers = {
style01 = "dj_01_lights_04",
style02 = "dj_02_lights_04",
style03 = "dj_03_lights_04",
style04 = "dj_04_lights_04",
Set = function(lights, refresh)
CayoPericoNightclub.Lights.Lasers.Clear(false)
SetIplPropState(CayoPericoNightclub.interiorId, lights, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoNightclub.interiorId, {
CayoPericoNightclub.Lights.Lasers.style01,
CayoPericoNightclub.Lights.Lasers.style02,
CayoPericoNightclub.Lights.Lasers.style03,
CayoPericoNightclub.Lights.Lasers.style04
}, false, refresh)
end
},
Clear = function(refresh)
CayoPericoNightclub.Lights.Droplets.Clear(refresh)
CayoPericoNightclub.Lights.Neons.Clear(refresh)
CayoPericoNightclub.Lights.Bands.Clear(refresh)
CayoPericoNightclub.Lights.Lasers.Clear(refresh)
end
},
LoadDefault = function()
-- Interior
CayoPericoNightclub.Security.Enable(true, false)
CayoPericoNightclub.Speakers.Set(CayoPericoNightclub.Speakers.basic, false)
CayoPericoNightclub.Podium.Enable(true, false)
CayoPericoNightclub.Turntables.Set(CayoPericoNightclub.Turntables.style01, false)
CayoPericoNightclub.Bar.Enable(true, false)
CayoPericoNightclub.Screen.Enable(CayoPericoNightclub.Screen.front, true, false)
CayoPericoNightclub.Lights.Lasers.Set(CayoPericoNightclub.Lights.Lasers.style04, false)
-- Exterior
CayoPericoNightclub.Ipl.Posters.Enable(CayoPericoNightclub.Ipl.Posters.palmstraxx, true)
CayoPericoNightclub.Ipl.Posters.Enable(CayoPericoNightclub.Ipl.Posters.moodymann, true)
CayoPericoNightclub.Ipl.Posters.Enable(CayoPericoNightclub.Ipl.Posters.keinemusik, true)
RefreshInterior(CayoPericoNightclub.interiorId)
end
}

View File

@ -0,0 +1,71 @@
-- Submarine: 1560.0, 400.0, -50.0
exports('GetCayoPericoSubmarine', function()
return CayoPericoSubmarine
end)
CayoPericoSubmarine = {
interiorId = 281345,
Workshop = {
brig = "entity_set_brig",
workshop = "entity_set_weapons",
Set = function(room, refresh)
CayoPericoSubmarine.Workshop.Clear(false)
SetIplPropState(CayoPericoSubmarine.interiorId, room, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoSubmarine.interiorId, {
CayoPericoSubmarine.Workshop.brig,
CayoPericoSubmarine.Workshop.workshop
}, false, refresh)
end
},
Chairs = {
chairs = "entity_set_guide",
Enable = function(state, refresh)
SetIplPropState(CayoPericoSubmarine.interiorId, CayoPericoSubmarine.Chairs.chairs, state, refresh)
end
},
Lights = {
on = "entity_set_hatch_lights_on",
off = "entity_set_hatch_lights_off",
Set = function(lights, refresh)
CayoPericoSubmarine.Lights.Clear(false)
SetIplPropState(CayoPericoSubmarine.interiorId, lights, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(CayoPericoSubmarine.interiorId, {
CayoPericoSubmarine.Lights.on,
CayoPericoSubmarine.Lights.off
}, false, refresh)
end
},
Details = {
bomb = "entity_set_demolition",
torch = "entity_set_acetylene",
cutter = "entity_set_plasma",
fingerprint = "entity_set_fingerprint",
suppressors = "entity_set_suppressors",
jammer = "entity_set_jammer",
Enable = function(details, state, refresh)
SetIplPropState(CayoPericoSubmarine.interiorId, details, state, refresh)
end
},
LoadDefault = function()
CayoPericoSubmarine.Workshop.Set(CayoPericoSubmarine.Workshop.brig, false)
CayoPericoSubmarine.Chairs.Enable(true, false)
CayoPericoSubmarine.Lights.Set(CayoPericoSubmarine.Lights.off, false)
RefreshInterior(CayoPericoSubmarine.interiorId)
end
}

View File

@ -0,0 +1,7 @@
CreateThread(function()
RequestIpl("m23_2_acp_collision_fixes_01")
RequestIpl("m23_2_acp_collision_fixes_02")
RequestIpl("m23_2_tug_collision")
RequestIpl("m23_2_hei_yacht_collision_fixes")
RequestIpl("m23_2_vinewood_garage")
end)

View File

@ -0,0 +1,24 @@
-- Cargo ship: -344.4349, -4062.832, 17.000
exports('GetChopShopCargoShipObject', function()
return ChopShopCargoShip
end)
ChopShopCargoShip = {
Ipl = {
ipl = {
"m23_2_cargoship",
"m23_2_cargoship_bridge"
},
Load = function()
EnableIpl(ChopShopCargoShip.Ipl.ipl, true)
end,
Remove = function()
EnableIpl(ChopShopCargoShip.Ipl.ipl, false)
end
},
LoadDefault = function()
ChopShopCargoShip.Ipl.Load()
end
}

View File

@ -0,0 +1,22 @@
-- Cartel Garage: 1220.133, -2277.844, -50.000
exports('GetChopShopCartelGarageObject', function()
return ChopShopCartelGarage
end)
ChopShopCartelGarage = {
interiorId = 293633,
Entities = {
entities = "mp2023_02_dlc_int_6_cb",
Enable = function(state, refresh)
SetIplPropState(ChopShopCartelGarage.interiorId, ChopShopCartelGarage.Entities.entities, state, refresh)
end
},
LoadDefault = function()
ChopShopCartelGarage.Entities.Enable(true, false)
RefreshInterior(ChopShopCartelGarage.interiorId)
end
}

View File

@ -0,0 +1,21 @@
-- Lifeguard: -1488.153, -1021.166, 5.000
exports('GetChopShopLifeguardObject', function()
return ChopShopLifeguard
end)
ChopShopLifeguard = {
Ipl = {
ipl = "m23_2_lifeguard_access",
Load = function()
EnableIpl(ChopShopLifeguard.Ipl.ipl, true)
end,
Remove = function()
EnableIpl(ChopShopLifeguard.Ipl.ipl, false)
end
},
LoadDefault = function()
ChopShopLifeguard.Ipl.Load()
end
}

View File

@ -0,0 +1,115 @@
-- Salvage Yard: 1077.276, -2274.876, -50.000
exports('GetChopShopSalvageObject', function()
return ChopShopSalvage
end)
ChopShopSalvage = {
interiorId = 293377,
Ipl = {
Exterior = {
ipl = {
"m23_2_sp1_03_reds",
"m23_2_sc1_03_reds",
"m23_2_id2_04_reds",
"m23_2_cs1_05_reds",
"m23_2_cs4_11_reds",
},
Load = function()
EnableIpl(ChopShopSalvage.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(ChopShopSalvage.Ipl.Exterior.ipl, false)
end
}
},
Style = {
basic = {
"set_mechanic_basic",
"set_safe_basic"
},
upgrade = {
"set_mechanic_upgrade",
"set_safe_upgrade"
},
Set = function(style, refresh)
ChopShopSalvage.Style.Clear(false)
SetIplPropState(ChopShopSalvage.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(ChopShopSalvage.interiorId, {
ChopShopSalvage.Style.basic,
ChopShopSalvage.Style.upgrade
}, false, refresh)
end
},
Lift1 = {
down = "set_car_lift_01_down",
up = "set_car_lift_01_up",
Set = function(lift, refresh)
ChopShopSalvage.Lift1.Clear(false)
SetIplPropState(ChopShopSalvage.interiorId, lift, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(ChopShopSalvage.interiorId, {
ChopShopSalvage.Lift1.down,
ChopShopSalvage.Lift1.up
}, false, refresh)
end
},
Lift2 = {
down = "set_car_lift_02_down",
up = "set_car_lift_02_up",
Set = function(lift, refresh)
ChopShopSalvage.Lift2.Clear(false)
SetIplPropState(ChopShopSalvage.interiorId, lift, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(ChopShopSalvage.interiorId, {
ChopShopSalvage.Lift2.down,
ChopShopSalvage.Lift2.up
}, false, refresh)
end
},
Tint = {
gray = 1,
red = 2,
blue = 3,
orange = 4,
yellow = 5,
green = 6,
pink = 7,
teal = 8,
darkGray = 9,
SetColor = function(color, refresh)
SetIplPropState(ChopShopSalvage.interiorId, "set_tint_b", true, refresh)
SetInteriorEntitySetColor(ChopShopSalvage.interiorId, "set_tint_b", color)
end
},
LoadDefault = function()
-- Exterior
ChopShopSalvage.Ipl.Exterior.Load()
-- Interior
ChopShopSalvage.Tint.SetColor(ChopShopSalvage.Tint.gray, false)
ChopShopSalvage.Style.Set(ChopShopSalvage.Style.upgrade, false)
ChopShopSalvage.Lift1.Set(ChopShopSalvage.Lift1.up, false)
ChopShopSalvage.Lift2.Set(ChopShopSalvage.Lift2.up, false)
RefreshInterior(ChopShopSalvage.interiorId)
end
}

View File

@ -57,7 +57,7 @@ DoomsdayFacility = {
},
Walls = {
SetColor = function(color, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, "set_int_02_shell", color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, "set_int_02_shell", color)
if refresh then
RefreshInterior(DoomsdayFacility.interiorId)
@ -104,7 +104,7 @@ DoomsdayFacility = {
DoomsdayFacility.Lounge.Clear(false)
SetIplPropState(DoomsdayFacility.interiorId, lounge, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, lounge, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, lounge, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
@ -124,7 +124,7 @@ DoomsdayFacility = {
DoomsdayFacility.Sleeping.Clear(false)
SetIplPropState(DoomsdayFacility.interiorId, sleep, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, sleep, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, sleep, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
@ -143,7 +143,7 @@ DoomsdayFacility = {
DoomsdayFacility.Security.Clear(false)
SetIplPropState(DoomsdayFacility.interiorId, security, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, security, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, security, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
@ -160,7 +160,7 @@ DoomsdayFacility = {
DoomsdayFacility.Cannon.Clear(false)
SetIplPropState(DoomsdayFacility.interiorId, cannon, true, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, cannon, color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, cannon, color)
end,
Clear = function(refresh)
SetIplPropState(DoomsdayFacility.interiorId, {
@ -182,13 +182,13 @@ DoomsdayFacility = {
RequestModel(model)
while not HasModelLoaded(model) do
Citizen.Wait(0)
Wait(0)
end
local privacyGlass = CreateObject(model, 367.99, 4827.745, -59.0, false, false, false)
SetEntityAsMissionEntity(privacyGlass, true, 0)
SetEntityCollision_2(privacyGlass, false, 0)
SetEntityCompletelyDisableCollision(privacyGlass, false, 0)
SetEntityInvincible(privacyGlass, true)
SetEntityAlpha(privacyGlass, 254, false)
end
@ -211,7 +211,7 @@ DoomsdayFacility = {
if handle == 0 then
RequestModel(DoomsdayFacility.PrivacyGlass.controlModelHash)
while not HasModelLoaded(DoomsdayFacility.PrivacyGlass.controlModelHash) do
Citizen.Wait(0)
Wait(0)
end
local privacyGlass = CreateObjectNoOffset(DoomsdayFacility.PrivacyGlass.controlModelHash, DoomsdayFacility.PrivacyGlass.Bedroom.Control.position.x, DoomsdayFacility.PrivacyGlass.Bedroom.Control.position.y, DoomsdayFacility.PrivacyGlass.Bedroom.Control.position.z, true, true, false)
@ -269,13 +269,13 @@ DoomsdayFacility = {
if entityToAttach ~= 0 then
RequestModel(glass.modelHash)
while not HasModelLoaded(glass.modelHash) do
Citizen.Wait(0)
Wait(0)
end
local privacyGlass = CreateObject(glass.modelHash, glass.entityPos.x, glass.entityPos.y, glass.entityPos.z, false, false, false)
SetEntityAsMissionEntity(privacyGlass, true, false)
SetEntityCollision_2(privacyGlass, false, 0)
SetEntityCompletelyDisableCollision(privacyGlass, false, 0)
SetEntityInvincible(privacyGlass, true)
SetEntityAlpha(privacyGlass, 254, false)
AttachEntityToEntity(privacyGlass, entityToAttach, -1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 2, 1)
@ -301,7 +301,7 @@ DoomsdayFacility = {
if handle == 0 then
RequestModel(DoomsdayFacility.PrivacyGlass.controlModelHash)
while not HasModelLoaded(DoomsdayFacility.PrivacyGlass.controlModelHash) do
Citizen.Wait(0)
Wait(0)
end
local privacyGlass = CreateObjectNoOffset(DoomsdayFacility.PrivacyGlass.controlModelHash, DoomsdayFacility.PrivacyGlass.Lounge.Control.position.x, DoomsdayFacility.PrivacyGlass.Lounge.Control.position.y, DoomsdayFacility.PrivacyGlass.Lounge.Control.position.z, true, true, false)
@ -366,7 +366,7 @@ DoomsdayFacility = {
submarine = "set_int_02_trophy_sub",
SetColor = function(color, refresh)
SetInteriorPropColor(DoomsdayFacility.interiorId, "set_int_02_trophy_sub", color)
SetInteriorEntitySetColor(DoomsdayFacility.interiorId, "set_int_02_trophy_sub", color)
if refresh then
RefreshInterior(DoomsdayFacility.interiorId)

View File

@ -0,0 +1,5 @@
CreateThread(function()
RequestIpl("xm3_collision_fixes")
RequestIpl("xm3_sum2_fix")
RequestIpl("xm3_security_fix")
end)

View File

@ -0,0 +1,51 @@
-- Freakshop: 570.9713, -420.0727, -70.000
exports('GetDrugWarsFreakshopObject', function()
return DrugWarsFreakshop
end)
DrugWarsFreakshop = {
interiorId = 290817,
Ipl = {
Exterior = {
ipl = {
"xm3_warehouse",
"xm3_warehouse_grnd"
},
Load = function()
EnableIpl(DrugWarsFreakshop.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(DrugWarsFreakshop.Ipl.Exterior.ipl, false)
end
}
},
Door = {
opened = "entity_set_roller_door_open",
closed = "entity_set_roller_door_closed",
Set = function(door, refresh)
DrugWarsFreakshop.Door.Clear()
SetIplPropState(DrugWarsFreakshop.interiorId, door, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(DrugWarsFreakshop.interiorId, {
DrugWarsFreakshop.Door.opened,
DrugWarsFreakshop.Door.closed
}, false, refresh)
end
},
LoadDefault = function()
-- Exterior
DrugWarsFreakshop.Ipl.Exterior.Load()
-- Interior
DrugWarsFreakshop.Door.Set(DrugWarsFreakshop.Door.closed, false)
RefreshInterior(DrugWarsFreakshop.interiorId)
end
}

View File

@ -0,0 +1,115 @@
-- Eclipse Boulevard Garage: 519.2477, -2618.788, -50.000
exports('GetDrugWarsGarageObject', function()
return DrugWarsGarage
end)
DrugWarsGarage = {
interiorId = 290561,
Ipl = {
Exterior = {
ipl = "xm3_garage_fix",
Load = function()
EnableIpl(DrugWarsGarage.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(DrugWarsGarage.Ipl.Exterior.ipl, false)
end
}
},
Banner = {
model = `ss1_13_clth_ss1_13`,
position = vector3(-277.1116, 281.5493, 98.6691),
Hide = function()
CreateModelHide(DrugWarsGarage.Banner.position, 10.0, DrugWarsGarage.Banner.model, true)
end,
Restore = function()
RemoveModelHide(DrugWarsGarage.Banner.position, 10.0, DrugWarsGarage.Banner.model, false)
end
},
Numbering = {
none = "",
level1 = "entity_set_numbers_01",
level2 = "entity_set_numbers_02",
level3 = "entity_set_numbers_03",
level4 = "entity_set_numbers_04",
level5 = "entity_set_numbers_05",
Set = function(num, refresh)
DrugWarsGarage.Numbering.Clear(false)
if num ~= "" then
SetIplPropState(DrugWarsGarage.interiorId, num, true, refresh)
else
if refresh then
RefreshInterior(DrugWarsGarage.interiorId)
end
end
end,
Clear = function(refresh)
SetIplPropState(DrugWarsGarage.interiorId, {
DrugWarsGarage.Numbering.level1,
DrugWarsGarage.Numbering.level2,
DrugWarsGarage.Numbering.level3,
DrugWarsGarage.Numbering.level4,
DrugWarsGarage.Numbering.level5
}, false, refresh)
end
},
Style = {
immaculate = "entity_set_shell_01",
industrial = "entity_set_shell_02",
indulgent = "entity_set_shell_03",
Set = function(style, refresh)
DrugWarsGarage.Style.Clear(false)
SetIplPropState(DrugWarsGarage.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(DrugWarsGarage.interiorId, {
DrugWarsGarage.Style.immaculate,
DrugWarsGarage.Style.industrial,
DrugWarsGarage.Style.indulgent
}, false, refresh)
end
},
Tint = {
white = 1,
gray = 2,
black = 3,
purple = 4,
orange = 5,
yellow = 6,
blue = 7,
red = 8,
green = 9,
lightBlue = 10,
lightRed = 11,
lightGreen = 12,
SetColor = function(color, refresh)
SetIplPropState(DrugWarsGarage.interiorId, "entity_set_tint_01", true, refresh)
SetInteriorEntitySetColor(DrugWarsGarage.interiorId, "entity_set_tint_01", color)
end
},
LoadDefault = function()
-- Exterior
DrugWarsGarage.Ipl.Exterior.Load()
DrugWarsGarage.Banner.Hide()
-- Interior
DrugWarsGarage.Numbering.Set(DrugWarsGarage.Numbering.level1, false)
DrugWarsGarage.Style.Set(DrugWarsGarage.Style.immaculate, false)
DrugWarsGarage.Tint.SetColor(DrugWarsGarage.Tint.white, false)
RefreshInterior(DrugWarsGarage.interiorId)
end
}

View File

@ -0,0 +1,38 @@
-- Acid Lab: 483.4252, -2625.071, -50.000
exports('GetDrugWarsLabObject', function()
return DrugWarsLab
end)
DrugWarsLab = {
interiorId = 290305,
Details = {
products = {
"set_product_01",
"set_product_02",
"set_product_03",
"set_product_04",
"set_product_05"
},
supplies = {
"set_supplies_01",
"set_supplies_02",
"set_supplies_03",
"set_supplies_04",
"set_supplies_05",
},
equipment = "set_equipment_upgrade",
Enable = function(details, state, refresh)
SetIplPropState(DrugWarsLab.interiorId, details, state, refresh)
end
},
LoadDefault = function()
DrugWarsLab.Details.Enable(DrugWarsLab.Details.products, true, false)
DrugWarsLab.Details.Enable(DrugWarsLab.Details.supplies, true, false)
DrugWarsLab.Details.Enable(DrugWarsLab.Details.equipment, true, false)
RefreshInterior(DrugWarsLab.interiorId)
end
}

View File

@ -0,0 +1,12 @@
-- Train crash: 2630.595, 1458.144, 25.3669
exports('GetDrugWarsTrainCrashObject', function()
return DrugWarsTrainCrash
end)
DrugWarsTrainCrash = {
ipl = "xm3_train_crash",
Enable = function(state)
EnableIpl(DrugWarsTrainCrash.ipl, state)
end
}

View File

@ -116,8 +116,7 @@ FinanceOffice1 = {
elseif doorSide:lower() == "right" then
FinanceOffice1.Safe.isRightDoorOpen = true
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
Close = function(doorSide)
@ -126,8 +125,7 @@ FinanceOffice1 = {
elseif doorSide:lower() == "right" then
FinanceOffice1.Safe.isRightDoorOpen = false
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
@ -152,7 +150,7 @@ FinanceOffice1 = {
end
if doorHandle == 0 then
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
print("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
return
end
@ -165,7 +163,7 @@ FinanceOffice1 = {
local doorHandle = GetClosestObjectOfType(FinanceOffice1.Safe.Position.x, FinanceOffice1.Safe.Position.y, FinanceOffice1.Safe.Position.z, 5.0, doorHash, false, false, false)
while doorHandle == 0 do
Citizen.Wait(25)
Wait(25)
doorHandle = GetClosestObjectOfType(FinanceOffice1.Safe.Position.x, FinanceOffice1.Safe.Position.y, FinanceOffice1.Safe.Position.z, 5.0, doorHash, false, false, false)
timeout = timeout - 1
@ -320,8 +318,7 @@ FinanceOffice1 = {
},
LoadDefault = function()
FinanceOffice3.Booze.Set(FinanceOffice3.Booze.on, true)
FinanceOffice1.Style.Set(FinanceOffice1.Style.Theme.warm, true)
FinanceOffice1.Style.Set(FinanceOffice1.Style.Theme.polished)
FinanceOffice1.Chairs.Set(FinanceOffice1.Chairs.on, true)
end
}

View File

@ -116,8 +116,7 @@ FinanceOffice2 = {
elseif doorSide:lower() == "right" then
FinanceOffice2.Safe.isRightDoorOpen = true
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
Close = function(doorSide)
@ -126,8 +125,7 @@ FinanceOffice2 = {
elseif doorSide:lower() == "right" then
FinanceOffice2.Safe.isRightDoorOpen = false
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
@ -152,7 +150,7 @@ FinanceOffice2 = {
end
if doorHandle == 0 then
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
print("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
return
end
@ -165,7 +163,7 @@ FinanceOffice2 = {
local doorHandle = GetClosestObjectOfType(FinanceOffice2.Safe.Position.x, FinanceOffice2.Safe.Position.y, FinanceOffice2.Safe.Position.z, 5.0, doorHash, false, false, false)
while doorHandle == 0 do
Citizen.Wait(25)
Wait(25)
doorHandle = GetClosestObjectOfType(FinanceOffice2.Safe.Position.x, FinanceOffice2.Safe.Position.y, FinanceOffice2.Safe.Position.z, 5.0, doorHash, false, false, false)
timeout = timeout - 1

View File

@ -116,8 +116,7 @@ FinanceOffice3 = {
elseif doorSide:lower() == "right" then
FinanceOffice3.Safe.isRightDoorOpen = true
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
Close = function(doorSide)
@ -126,8 +125,7 @@ FinanceOffice3 = {
elseif doorSide:lower() == "right" then
FinanceOffice3.Safe.isRightDoorOpen = false
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
@ -152,7 +150,7 @@ FinanceOffice3 = {
end
if doorHandle == 0 then
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
print("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
return
end
@ -165,7 +163,7 @@ FinanceOffice3 = {
local doorHandle = GetClosestObjectOfType(FinanceOffice3.Safe.Position.x, FinanceOffice3.Safe.Position.y, FinanceOffice3.Safe.Position.z, 5.0, doorHash, false, false, false)
while doorHandle == 0 do
Citizen.Wait(25)
Wait(25)
doorHandle = GetClosestObjectOfType(FinanceOffice3.Safe.Position.x, FinanceOffice3.Safe.Position.y, FinanceOffice3.Safe.Position.z, 5.0, doorHash, false, false, false)
timeout = timeout - 1

View File

@ -116,8 +116,7 @@ FinanceOffice4 = {
elseif doorSide:lower() == "right" then
FinanceOffice4.Safe.isRightDoorOpen = true
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
Close = function(doorSide)
@ -126,8 +125,7 @@ FinanceOffice4 = {
elseif doorSide:lower() == "right" then
FinanceOffice4.Safe.isRightDoorOpen = false
else
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are:")
Citizen.Trace("left right")
print("[bob74_ipl] Warning: " .. doorSide .. " is not a correct value. Valid values are: left right")
end
end,
@ -152,7 +150,7 @@ FinanceOffice4 = {
end
if doorHandle == 0 then
Citizen.Trace("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
print("[bob74_ipl] Warning: " .. doorSide .. " safe door handle is 0")
return
end
@ -165,7 +163,7 @@ FinanceOffice4 = {
local doorHandle = GetClosestObjectOfType(FinanceOffice4.Safe.Position.x, FinanceOffice4.Safe.Position.y, FinanceOffice4.Safe.Position.z, 5.0, doorHash, false, false, false)
while doorHandle == 0 do
Citizen.Wait(25)
Wait(25)
doorHandle = GetClosestObjectOfType(FinanceOffice4.Safe.Position.x, FinanceOffice4.Safe.Position.y, FinanceOffice4.Safe.Position.z, 5.0, doorHash, false, false, false)
timeout = timeout - 1

View File

@ -73,7 +73,7 @@ FinanceOrganization = {
ReleaseNamedRendertarget(GetHashKey(FinanceOrganization.Office.target))
end
if HasNamedScaleformMovieLoaded(FinanceOrganization.Office.movieId) then
if HasScaleformMovieFilenameLoaded(FinanceOrganization.Office.movieId) then
SetScaleformMovieAsNoLongerNeeded(FinanceOrganization.Office.movieId)
end
@ -84,7 +84,7 @@ FinanceOrganization = {
}
}
Citizen.CreateThread(function()
CreateThread(function()
FinanceOrganization.Office.Init()
while true do
@ -95,19 +95,19 @@ Citizen.CreateThread(function()
FinanceOrganization.Office.loaded = true
Citizen.Wait(0) -- We need to call all this every frame
Wait(0) -- We need to call all this every frame
else
Citizen.Wait(1000) -- We are not inside an office
Wait(1000) -- We are not inside an office
end
elseif FinanceOrganization.Office.loaded then
-- Loaded and need to unload
FinanceOrganization.Office.Clear()
FinanceOrganization.Office.loaded = false
Citizen.Wait(1000) -- We can wait longer when we don't need to display text
Wait(1000) -- We can wait longer when we don't need to display text
else
-- Not needed to load
Citizen.Wait(1000) -- We can wait longer when we don't need to display text
Wait(1000) -- We can wait longer when we don't need to display text
end
end
end)

View File

@ -34,7 +34,7 @@ GunrunningYacht = {
if handle == 0 then
RequestModel(GunrunningYacht.Water.modelHash)
while not HasModelLoaded(GunrunningYacht.Water.modelHash) do
Citizen.Wait(0)
Wait(0)
end
local water = CreateObjectNoOffset(GunrunningYacht.Water.modelHash, -1369.0, 6736.0, 5.40, false, false, false)

View File

@ -34,7 +34,7 @@ HeistYacht = {
if handle == 0 then
RequestModel(HeistYacht.Water.modelHash)
while not HasModelLoaded(HeistYacht.Water.modelHash) do
Citizen.Wait(0)
Wait(0)
end
local water = CreateObjectNoOffset(HeistYacht.Water.modelHash, -2023.773, -1038.0, 5.40, false, false, false)

View File

@ -0,0 +1,44 @@
-- Vinewood Car Club: 1202.407, -3251.251, -50.000
exports('GetMercenariesClubObject', function()
return MercenariesClub
end)
MercenariesClub = {
interiorId = 291841,
Style = {
empty = "entity_set_no_plus", -- The lamps if the podium is not there
club = {
"entity_set_plus",
"entity_set_backdrop_frames",
"entity_set_signs"
},
Set = function(style, refresh)
MercenariesClub.Style.Clear(false)
SetIplPropState(MercenariesClub.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(MercenariesClub.interiorId, {
MercenariesClub.Style.empty,
MercenariesClub.Style.club
}, false, refresh)
end
},
Stairs = {
stairs = "entity_set_stairs",
Enable = function(state, refresh)
SetIplPropState(MercenariesClub.interiorId, MercenariesClub.Stairs.stairs, state, refresh)
end
},
LoadDefault = function()
MercenariesClub.Style.Set(MercenariesClub.Style.club, false)
MercenariesClub.Stairs.Enable(true, false)
RefreshInterior(MercenariesClub.interiorId)
end
}

View File

@ -0,0 +1,16 @@
-- Map fixes
exports('GetMercenariesFixesObject', function()
return MercenariesFixes
end)
MercenariesFixes = {
ipl = "m23_1_legacy_fixes",
Enable = function(state)
EnableIpl(MercenariesFixes.ipl, state)
end,
LoadDefault = function()
MercenariesFixes.Enable(true)
end
}

View File

@ -0,0 +1,28 @@
-- Fort Zancudo Lab: -1916.119, 3749.719, -100.000
exports('GetMercenariesLabObject', function()
return MercenariesLab
end)
MercenariesLab = {
interiorId = 292097,
Details = {
levers = "entity_set_levers",
crates = "entity_set_crates",
weapons = "entity_set_weapons",
lights = "entity_set_lift_lights",
Enable = function(details, state, refresh)
SetIplPropState(MercenariesLab.interiorId, details, state, refresh)
end
},
LoadDefault = function()
MercenariesLab.Details.Enable(MercenariesLab.Details.levers, true, false)
MercenariesLab.Details.Enable(MercenariesLab.Details.crates, true, false)
MercenariesLab.Details.Enable(MercenariesLab.Details.weapons, true, false)
MercenariesLab.Details.Enable(MercenariesLab.Details.lights, true, false)
RefreshInterior(MercenariesLab.interiorId)
end
}

View File

@ -34,7 +34,7 @@ SmugglerHangar = {
SetColor = function(color, refresh)
SetIplPropState(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, SmugglerHangar.Walls.default, color)
end,
},
Floor = {
@ -73,7 +73,7 @@ SmugglerHangar = {
SmugglerHangar.Floor.Decals.Clear(false)
SetIplPropState(SmugglerHangar.interiorId, decal, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, decal, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, decal, color)
end,
Clear = function(refresh)
SetIplPropState(SmugglerHangar.interiorId, {
@ -99,7 +99,7 @@ SmugglerHangar = {
if crane ~= "" then
SetIplPropState(SmugglerHangar.interiorId, crane, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, crane, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, crane, color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
@ -123,7 +123,7 @@ SmugglerHangar = {
if mod ~= "" then
SetIplPropState(SmugglerHangar.interiorId, mod, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, mod, color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, mod, color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
@ -173,7 +173,7 @@ SmugglerHangar = {
if bed ~= "" then
SetIplPropState(SmugglerHangar.interiorId, bed, true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, "set_bedroom_tint", color)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, "set_bedroom_tint", color)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)
@ -223,7 +223,7 @@ SmugglerHangar = {
if light ~= "" then
SetIplPropState(SmugglerHangar.interiorId, "set_lighting_tint_props", true, refresh)
SetInteriorPropColor(SmugglerHangar.interiorId, "set_lighting_tint_props", light)
SetInteriorEntitySetColor(SmugglerHangar.interiorId, "set_lighting_tint_props", light)
else
if refresh then
RefreshInterior(SmugglerHangar.interiorId)

View File

@ -0,0 +1,4 @@
CreateThread(function()
RequestIpl("m24_1_legacyfixes")
RequestIpl("m24_1_pizzasigns")
end)

View File

@ -0,0 +1,25 @@
-- Aircraft carrier: -3208.03, 3954.54, 14.0
exports('GetSummerCarrierObject', function()
return SummerCarrier
end)
SummerCarrier = {
ipl = {
"m24_1_carrier",
"m24_1_carrier_int1",
"m24_1_carrier_int2",
"m24_1_carrier_int3",
"m24_1_carrier_int4",
"m24_1_carrier_int5",
"m24_1_carrier_int6",
"m24_1_carrier_ladders"
},
Enable = function(state)
EnableIpl(SummerCarrier.ipl, state)
end,
LoadDefault = function()
SummerCarrier.Enable(true)
end
}

View File

@ -0,0 +1,114 @@
-- Bail office: 565.886, -2688.761, -50.0
exports('GetSummerOfficeObject', function()
return SummerOffice
end)
SummerOffice = {
interiorId = 295425,
Ipl = {
Exterior = {
ipl = {
"m24_1_bailoffice_davis",
"m24_1_bailoffice_delperro",
"m24_1_bailoffice_missionrow",
"m24_1_bailoffice_paletobay",
"m24_1_bailoffice_vinewood"
},
Load = function()
EnableIpl(SummerOffice.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(SummerOffice.Ipl.Exterior.ipl, false)
end
}
},
Style = {
vintage = "set_style_01",
patterns = "set_style_02",
teak = "set_style_03",
Set = function(style, refresh)
SummerOffice.Style.Clear(false)
SetIplPropState(SummerOffice.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(SummerOffice.interiorId, {
SummerOffice.Style.vintage,
SummerOffice.Style.patterns,
SummerOffice.Style.teak
}, false, refresh)
end
},
Desk = {
files = "set_no_staff",
computers = "set_staff_upgrade",
Set = function(style, refresh)
SummerOffice.Desk.Clear(false)
SetIplPropState(SummerOffice.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(SummerOffice.interiorId, {
SummerOffice.Desk.files,
SummerOffice.Desk.computers
}, false, refresh)
end
},
Gunsafe = {
cabinet = "set_gunsafe_off",
gunsafe = "set_gunsafe_on",
Set = function(style, refresh)
SummerOffice.Gunsafe.Clear(false)
SetIplPropState(SummerOffice.interiorId, style, true, refresh)
end,
Clear = function(refresh)
SetIplPropState(SummerOffice.interiorId, {
SummerOffice.Gunsafe.cabinet,
SummerOffice.Gunsafe.gunsafe
}, false, refresh)
end
},
Trophy = {
plaque = "set_trophy_10x",
badge = "set_trophy_24x",
handcuffs = "set_trophy_100x",
Enable = function(trophy, state, refresh)
SetIplPropState(SummerOffice.interiorId, trophy, state, refresh)
end
},
Plant = {
plant = "set_new_plant",
Enable = function(state, refresh)
SetIplPropState(SummerOffice.interiorId, SummerOffice.Plant.plant, state, refresh)
end
},
LoadDefault = function()
SummerOffice.Ipl.Exterior.Load()
SummerOffice.Style.Set(SummerOffice.Style.teak, false)
SummerOffice.Desk.Set(SummerOffice.Desk.files, false)
SummerOffice.Gunsafe.Set(SummerOffice.Gunsafe.cabinet, false)
SummerOffice.Trophy.Enable(SummerOffice.Trophy.plaque, true, false)
SummerOffice.Trophy.Enable(SummerOffice.Trophy.badge, true, false)
SummerOffice.Trophy.Enable(SummerOffice.Trophy.handcuffs, true, false)
SummerOffice.Plant.Enable(true, false)
RefreshInterior(SummerOffice.interiorId)
end
}

View File

@ -6,7 +6,7 @@ TunerGarage = {
InteriorId = 285953,
Ipl = {
Interior = {
Exterior = {
ipl = {
'tr_tuner_shop_burton',
'tr_tuner_shop_mesa',
@ -17,10 +17,10 @@ TunerGarage = {
},
Load = function()
EnableIpl(TunerGarage.Ipl.Interior.ipl, true)
EnableIpl(TunerGarage.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(TunerGarage.Ipl.Interior.ipl, false)
EnableIpl(TunerGarage.Ipl.Exterior.ipl, false)
end,
},
Entities = {
@ -89,6 +89,6 @@ TunerGarage = {
TunerGarage.Ipl.Load()
TunerGarage.Entities.Load()
RefreshInterior(TunerGarage.interiorId)
RefreshInterior(TunerGarage.InteriorId)
end
}

View File

@ -1,3 +1,4 @@
-- Los Santos Car Meet: -2000.0, 1113.211, -25.36243
exports('GetTunerMeetupObject', function()
return TunerMeetup
end)
@ -6,7 +7,7 @@ TunerMeetup = {
InteriorId = 285697,
Ipl = {
Interior = {
Exterior = {
ipl = {
'tr_tuner_meetup',
'tr_tuner_race_line'
@ -14,20 +15,20 @@ TunerMeetup = {
},
Load = function()
EnableIpl(TunerMeetup.Ipl.Interior.ipl, true)
EnableIpl(TunerMeetup.Ipl.Exterior.ipl, true)
end,
Remove = function()
EnableIpl(TunerMeetup.Ipl.Interior.ipl, false)
EnableIpl(TunerMeetup.Ipl.Exterior.ipl, false)
end
},
Entities = {
entity_set_meet_crew = true,
entity_set_meet_lights = true,
entity_set_meet_lights_cheap = true,
entity_set_meet_lights_cheap = false,
entity_set_player = true,
entity_set_test_crew = false,
entity_set_test_lights = true,
entity_set_test_lights_cheap = true,
entity_set_test_lights_cheap = false,
entity_set_time_trial = true,
Set = function(name, state)
@ -59,6 +60,6 @@ TunerMeetup = {
TunerMeetup.Ipl.Load()
TunerMeetup.Entities.Load()
RefreshInterior(TunerMeetup.interiorId)
RefreshInterior(TunerMeetup.InteriorId)
end
}

View File

@ -36,7 +36,7 @@ TunerMethLab = {
LoadDefault = function()
TunerMethLab.Entities.Load()
SetInteriorEntitySetColor(TunerMethLab.interiorId, TunerMethLab.Entities.tintable_walls, 3)
RefreshInterior(TunerMethLab.interiorId)
SetInteriorEntitySetColor(TunerMethLab.InteriorId, TunerMethLab.Entities.tintable_walls, 3)
RefreshInterior(TunerMethLab.InteriorId)
end
}

View File

@ -1,13 +1,9 @@
-- Resources:
-- **********
-- IPL list: https://wiki.rage.mp/index.php?title=Interiors_and_Locations
fx_version 'adamant'
game 'gta5'
author 'Bob_74'
description 'Load and customize your map'
version '2.0.15'
version '2.4.0'
lua54 "yes"
@ -15,12 +11,14 @@ client_scripts {
"lib/common.lua"
, "lib/observers/interiorIdObserver.lua"
, "lib/observers/officeSafeDoorHandler.lua"
, "lib/observers/officeCullHandler.lua"
, "client.lua"
-- GTA V
, "gtav/base.lua" -- Base IPLs to fix holes
, "gtav/ammunations.lua"
, "gtav/bahama.lua"
, "gtav/cargoship.lua"
, "gtav/floyd.lua"
, "gtav/franklin.lua"
, "gtav/franklin_aunt.lua"
@ -108,6 +106,11 @@ client_scripts {
, "dlc_casino/casino.lua"
, "dlc_casino/penthouse.lua"
-- DLC Cayo Perico Heist (Requires forced build 2189 or higher)
, "dlc_cayoperico/base.lua"
, "dlc_cayoperico/nightclub.lua"
, "dlc_cayoperico/submarine.lua"
-- DLC Tuners (Requires forced build 2372 or higher)
, "dlc_tuner/garage.lua"
, "dlc_tuner/meetup.lua"
@ -127,4 +130,34 @@ client_scripts {
, "gta_mpsum2/simeonfix.lua"
, "gta_mpsum2/vehicle_warehouse.lua"
, "gta_mpsum2/warehouse.lua"
-- DLC Los Santos Drug Wars (Requires forced build 2802 or higher)
, "dlc_drugwars/base.lua"
, "dlc_drugwars/freakshop.lua"
, "dlc_drugwars/garage.lua"
, "dlc_drugwars/lab.lua"
, "dlc_drugwars/traincrash.lua"
-- DLC San Andreas Mercenaries (Requires forced build 2944 or higher)
, "dlc_mercenaries/club.lua"
, "dlc_mercenaries/lab.lua"
, "dlc_mercenaries/fixes.lua"
-- DLC The Chop Shop (Requires forced build 3095 or higher)
, "dlc_chopshop/base.lua"
, "dlc_chopshop/cargoship.lua"
, "dlc_chopshop/cartel_garage.lua"
, "dlc_chopshop/lifeguard.lua"
, "dlc_chopshop/salvage.lua"
-- DLC Bottom Dollar Bounties (Requires forced build 3258 or higher)
, "dlc_summer/base.lua"
, "dlc_summer/carrier.lua"
, "dlc_summer/office.lua"
-- DLC Agents of Sabotage (Requires forced build 3407 or higher)
, "dlc_agents/base.lua"
, "dlc_agents/factory.lua"
, "dlc_agents/office.lua"
, "dlc_agents/airstrip.lua"
}

View File

@ -1,4 +1,4 @@
Citizen.CreateThread(function()
CreateThread(function()
-- Heist Jewel: -637.20159 -239.16250 38.1
RequestIpl("post_hiest_unload")
@ -106,4 +106,18 @@ Citizen.CreateThread(function()
-- Ferris wheel
RequestIpl("ferris_finale_anim")
-- Train track: 2626.374, 2949.869, 39.1409
RequestIpl("ld_rail_01_track")
RequestIpl("ld_rail_02_track")
-- Docks cranes: 887.7344, -2922.285, 34.000
RequestIpl("dockcrane1")
RequestIpl("pcranecont")
-- Construction lift: -180.5771, -1016.9276, 28.2893
RequestIpl("dt1_21_prop_lift_on")
-- Davis Quartz train: 2773.6099, 2835.3274, 35.1903
RequestIpl("cs5_4_trains")
end)

View File

@ -0,0 +1,33 @@
-- Cargo ship: -168.1825, -2364.8259, 20.000
exports('GetCargoShipObject', function()
return CargoShip
end)
CargoShip = {
State = {
normal = {
"cargoship",
"ship_occ_grp1"
},
sunk = {
"sunkcargoship",
"ship_occ_grp2"
},
Set = function(state)
CargoShip.State.Clear(false)
EnableIpl(state, state)
end,
Clear = function(refresh)
EnableIpl({
CargoShip.State.normal,
CargoShip.State.sunk
}, false)
end
},
LoadDefault = function()
CargoShip.State.Set(CargoShip.State.normal)
end
}

View File

@ -24,15 +24,51 @@ NorthYankton = {
"prologue05b",
"prologue06",
"prologue06b",
"prologue_occl",
"prologue06_int",
"prologuerd",
"prologuerdb",
"prologue_DistantLights",
"prologue_LODLights",
"prologue_m2_door"
"DES_ProTree_start",
"prologue_m2_door",
"prologue03_grv_cov"
},
Grave = {
covered = "prologue03_grv_cov",
dug = "prologue03_grv_dug",
funeral = "prologue03_grv_fun",
Set = function(grave)
NorthYankton.Grave.Clear()
EnableIpl(grave, true)
end,
Clear = function()
EnableIpl({
NorthYankton.Grave.covered,
NorthYankton.Grave.dug,
NorthYankton.Grave.funeral
}, false)
end
},
Traffic = {
Enable = function(state)
SetAllPathsCacheBoundingstruct(state)
SetRoadsInAngledArea(5526.24, -5137.23, 61.78925, 3679.327, -4973.879, 125.0828, 192, false, state, true);
SetRoadsInAngledArea(3691.211, -4941.24, 94.59368, 3511.115, -4869.191, 126.7621, 16, false, state, true);
SetRoadsInAngledArea(3510.004, -4865.81, 94.69557, 3204.424, -4833.817, 126.8152, 16, false, state, true);
SetRoadsInAngledArea(3186.534, -4832.798, 109.8148, 3202.187, -4833.993, 114.815, 16, false, state, true);
end
},
Enable = function(state)
NorthYankton.Grave.Clear()
NorthYankton.Traffic.Enable(state)
EnableIpl(NorthYankton.ipl, state)
end
}

View File

@ -66,7 +66,7 @@ Simeon = {
LoadDefault = function()
Simeon.Ipl.Interior.Load()
Simeon.Style.Set(Simeon.Style.normal)
Simeon.Shutter.Set(Simeon.Shutter.open)
Simeon.Shutter.Set(Simeon.Shutter.opened)
RefreshInterior(Simeon.interiorId)
end

View File

@ -35,11 +35,17 @@ Global = {
isInsideApartment5 = false,
isInsideApartment6 = false
},
Security = {
isInsideOffice1 = false,
isInsideOffice2 = false,
isInsideOffice3 = false,
isInsideOffice4 = false
},
-- Set all interiors variables to false
-- The loop inside 'interiorIdObserver' will set them to true
ResetInteriorVariables = function()
for _, parentKey in pairs{"Biker", "FinanceOffices", "HighLife"} do
for _, parentKey in pairs{"Biker", "FinanceOffices", "HighLife", "Security"} do
local t = Global[parentKey]
for key in pairs(t) do
@ -97,12 +103,12 @@ function SetIplPropState(interiorId, props, state, refresh)
end
else
if state then
if not IsInteriorPropEnabled(interiorId, props) then
EnableInteriorProp(interiorId, props)
if not IsInteriorEntitySetActive(interiorId, props) then
ActivateInteriorEntitySet(interiorId, props)
end
else
if IsInteriorPropEnabled(interiorId, props) then
DisableInteriorProp(interiorId, props)
if IsInteriorEntitySetActive(interiorId, props) then
DeactivateInteriorEntitySet(interiorId, props)
end
end
end
@ -138,7 +144,7 @@ function DrawEmptyRect(name, model)
local renderId = CreateNamedRenderTargetForModel(name, model)
while not IsNamedRendertargetRegistered(name) do
Citizen.Wait(step)
Wait(step)
currentTime = currentTime + step
@ -167,15 +173,15 @@ function SetupScaleform(movieId, scaleformFunction, parameters)
local p = parameters["p" .. tostring(i)]
if p.type == "bool" then
PushScaleformMovieMethodParameterBool(p.value)
ScaleformMovieMethodAddParamBool(p.value)
elseif p.type == "int" then
PushScaleformMovieMethodParameterInt(p.value)
ScaleformMovieMethodAddParamInt(p.value)
elseif p.type == "float" then
PushScaleformMovieMethodParameterFloat(p.value)
ScaleformMovieMethodAddParamFloat(p.value)
elseif p.type == "string" then
PushScaleformMovieMethodParameterString(p.value)
ScaleformMovieMethodAddParamTextureNameString(p.value)
elseif p.type == "buttonName" then
PushScaleformMovieMethodParameterButtonName(p.value)
ScaleformMovieMethodAddParamPlayerNameString(p.value)
end
end
end
@ -189,9 +195,9 @@ function LoadStreamedTextureDict(texturesDict)
local timeout = 5 * 1000
local currentTime = 0
RequestStreamedTextureDict(texturesDict, 0)
RequestStreamedTextureDict(texturesDict, false)
while not HasStreamedTextureDictLoaded(texturesDict) do
Citizen.Wait(step)
Wait(step)
currentTime = currentTime + step
@ -210,7 +216,7 @@ function LoadScaleform(scaleform)
local handle = RequestScaleformMovie(scaleform)
while not HasScaleformMovieLoaded(handle) do
Citizen.Wait(step)
Wait(step)
currentTime = currentTime + step
@ -229,7 +235,7 @@ function GetPedheadshot(ped)
local pedheadshot = RegisterPedheadshot(ped)
while not IsPedheadshotReady(pedheadshot) do
Citizen.Wait(step)
Wait(step)
currentTime = currentTime + step
@ -251,10 +257,10 @@ function GetPedheadshotTexture(ped)
local IsTextureDictLoaded = LoadStreamedTextureDict(textureDict)
if not IsTextureDictLoaded then
Citizen.Trace("ERROR: GetPedheadshotTexture - Textures dictionnary \"" .. tostring(textureDict) .. "\" cannot be loaded.")
print("ERROR: GetPedheadshotTexture - Textures dictionnary \"" .. tostring(textureDict) .. "\" cannot be loaded.")
end
else
Citizen.Trace("ERROR: GetPedheadshotTexture - PedHeadShot not ready.")
print("ERROR: GetPedheadshotTexture - PedHeadShot not ready.")
end
return textureDict

View File

@ -1,9 +1,8 @@
local _scanDelay = 500
Citizen.CreateThread(function()
CreateThread(function()
while true do
-- /!\ To do: Find a more reliable way to get the current interior ID
Global.currentInteriorId = GetInteriorAtCoords(GetEntityCoords(PlayerPedId()))
Global.currentInteriorId = GetInteriorFromEntity(PlayerPedId())
if Global.currentInteriorId == 0 then
Global.ResetInteriorVariables()
@ -41,8 +40,14 @@ Citizen.CreateThread(function()
Global.FinanceOffices.isInsideOffice2 = (Global.currentInteriorId == FinanceOffice2.currentInteriorId)
Global.FinanceOffices.isInsideOffice3 = (Global.currentInteriorId == FinanceOffice3.currentInteriorId)
Global.FinanceOffices.isInsideOffice4 = (Global.currentInteriorId == FinanceOffice4.currentInteriorId)
-- DLC: The Contract
Global.Security.isInsideOffice1 = (Global.currentInteriorId == MpSecurityOffice1.InteriorId)
Global.Security.isInsideOffice2 = (Global.currentInteriorId == MpSecurityOffice2.InteriorId)
Global.Security.isInsideOffice3 = (Global.currentInteriorId == MpSecurityOffice3.InteriorId)
Global.Security.isInsideOffice4 = (Global.currentInteriorId == MpSecurityOffice4.InteriorId)
end
Citizen.Wait(_scanDelay)
Wait(_scanDelay)
end
end)

View File

@ -0,0 +1,35 @@
CreateThread(function()
while true do
local sleep = 500
if Global.Security.isInsideOffice1 or Global.Security.isInsideOffice2 or Global.Security.isInsideOffice3 or Global.Security.isInsideOffice4 then
sleep = 0
if Global.Security.isInsideOffice1 then
EnableExteriorCullModelThisFrame(`bh1_05_build1`)
EnableExteriorCullModelThisFrame(`bh1_05_em`)
end
if Global.Security.isInsideOffice2 then
EnableExteriorCullModelThisFrame(`hei_hw1_08_hotplaz01`)
EnableExteriorCullModelThisFrame(`hw1_08_hotplaz_rail`)
EnableExteriorCullModelThisFrame(`hw1_08_emissive_c`)
end
if Global.Security.isInsideOffice3 then
EnableExteriorCullModelThisFrame(`hei_kt1_05_01`)
EnableExteriorCullModelThisFrame(`kt1_05_glue_b`)
EnableExteriorCullModelThisFrame(`kt1_05_kt_emissive_kt1_05`)
end
if Global.Security.isInsideOffice4 then
EnableExteriorCullModelThisFrame(`hei_kt1_08_buildingtop_a`)
EnableExteriorCullModelThisFrame(`hei_kt1_08_kt1_emissive_ema`)
end
DisableOcclusionThisFrame()
end
Wait(sleep)
end
end)

View File

@ -1,7 +1,7 @@
-- Delay between each attempt to open/close the doors corresponding to their state
local _scanDelay = 500
Citizen.CreateThread(function()
CreateThread(function()
while true do
local office = 0
@ -42,6 +42,6 @@ Citizen.CreateThread(function()
end
end
Citizen.Wait(_scanDelay)
Wait(_scanDelay)
end
end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@ -7,13 +7,13 @@ A FiveM resource to communicate with a MySQL database using [node-mysql2](https:
![](https://img.shields.io/github/contributors/overextended/oxmysql?logo=github)
![](https://img.shields.io/github/v/release/overextended/oxmysql?logo=github)
## 📚 Documentation
https://overextended.dev/oxmysql
## 💾 Download
https://github.com/overextended/oxmysql/releases/latest/download/oxmysql.zip
## 🔗 Links
- 💾 [Download](https://github.com/overextended/oxmysql/releases/latest/download/oxmysql.zip)
- Download the latest release directly.
- 📚 [Documentation](https://overextended.dev/oxmysql)
- For installation, setup, and everything else.
- 📦 [npm](https://www.npmjs.com/package/@overextended/oxmysql)
- Use our npm package for enhanced functionality and TypeScript support.
## ✨ Features
@ -24,9 +24,9 @@ https://github.com/overextended/oxmysql/releases/latest/download/oxmysql.zip
- Support for URI connection strings and semicolon separated values.
- Improved parameter checking and error handling.
## npm Package
## 🧾 Logging
https://www.npmjs.com/package/@overextended/oxmysql
We have included a module for submitting error logs to [Fivemanage](https://fivemanage.com/?ref=overextended), a cloud management service tailored for game servers. Additional logging options and support for other services will be available in the future.
## Lua Language Server

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
fx_version 'adamant'
fx_version 'cerulean'
game 'common'
use_experimental_fxv2_oal 'yes'
lua54 'yes'
name 'oxmysql'
author 'Overextended'
version '2.8.0'
version '2.12.0'
license 'LGPL-3.0-or-later'
repository 'https://github.com/overextended/oxmysql.git'
description 'FXServer to MySQL communication via node-mysql2'

View File

@ -1,17 +1,28 @@
local promise = promise
local Await = Citizen.Await
local GetCurrentResourceName = GetCurrentResourceName()
local resourceName = GetCurrentResourceName()
local GetResourceState = GetResourceState
local options = {
return_callback_errors = false
}
for i = 1, GetNumResourceMetadata(resourceName, 'mysql_option') do
local option = GetResourceMetadata(resourceName, 'mysql_option', i - 1)
options[option] = true
end
local function await(fn, query, parameters)
local p = promise.new()
fn(nil, query, parameters, function(result, error)
if error then
return p:reject(error)
end
p:resolve(result)
end, GetCurrentResourceName, true)
end, resourceName, true)
return Await(p)
end
@ -23,6 +34,7 @@ local function safeArgs(query, parameters, cb, transaction)
if queryType == 'number' then
query = queryStore[query]
assert(query, "First argument received invalid query store reference")
elseif transaction then
if queryType ~= 'table' then
error(("First argument expected table, received '%s'"):format(query))
@ -60,7 +72,7 @@ local oxmysql = exports.oxmysql
local mysql_method_mt = {
__call = function(self, query, parameters, cb)
query, parameters, cb = safeArgs(query, parameters, cb, self.method == 'transaction')
return oxmysql[self.method](nil, query, parameters, cb, GetCurrentResourceName, false)
return oxmysql[self.method](nil, query, parameters, cb, resourceName, options.return_callback_errors)
end
}
@ -136,4 +148,8 @@ MySQL.ready = setmetatable({
end,
})
function MySQL.startTransaction(cb)
return oxmysql:startTransaction(cb, resourceName)
end
_ENV.MySQL = MySQL

View File

@ -1,153 +0,0 @@
---@meta
---Lua Language Server annotations
---https://marketplace.visualstudio.com/items?itemName=sumneko.lua
MySQL = {}
---@class QueryResult
---@field affectedRows number?
---@field fieldCount number?
---@field info string?
---@field insertId number?
---@field serverStatus number?
---@field warningStatus number?
---@field changedRows number?
---@alias MySQLColumn unknown
---@alias MySQLRow { [string]?: MySQLColumn }
---@alias MySQLQuery QueryResult | { [number]?: { [string]: MySQLColumn } }
---@alias MySQLParameters any[] | { [string]: any }
---@alias MySQLTransaction
---| string[]
---| { [1]: string, [2]: MySQLParameters }[]
---| { query: string, values: MySQLParameters }[]
---| { query: string, parameters: MySQLParameters }[]
---@param query string
---@param parameters? MySQLParameters | fun(result: number)
---@param cb? fun(affectedRows: number)
function MySQL.update(query, parameters, cb) end
MySQL.Async.execute = MySQL.update
---@param query string
---@param parameters? MySQLParameters
---@return number affectedRows
---@async
function MySQL.update.await(query, parameters) end
MySQL.Sync.execute = MySQL.update.await
---@param query string
---@param parameters? MySQLParameters | fun(result: MySQLQuery)
---@param cb? fun(result: MySQLQuery)
function MySQL.query(query, parameters, cb) end
MySQL.Async.fetchAll = MySQL.query
---@param query string
---@param parameters? MySQLParameters
---@return MySQLQuery result
---@async
function MySQL.query.await(query, parameters) end
MySQL.Sync.fetchAll = MySQL.query.await
---@param query string
---@param parameters? MySQLParameters | fun(column?: MySQLColumn)
---@param cb? fun(column?: MySQLColumn)
function MySQL.scalar(query, parameters, cb) end
MySQL.Async.fetchScalar = MySQL.scalar
---@param query string
---@param parameters? MySQLParameters | fun(row?: MySQLRow)
---@param cb? fun(row?: MySQLRow)
function MySQL.single(query, parameters, cb) end
MySQL.Async.fetchSingle = MySQL.single
---@param query string
---@param parameters? MySQLParameters
---@return table<string, unknown> | nil row
---@async
function MySQL.single.await(query, parameters) end
MySQL.Sync.fetchSingle = MySQL.single.await
---@param query string
---@param parameters? MySQLParameters
---@return unknown | nil column
---@async
function MySQL.scalar.await(query, parameters) end
MySQL.Sync.fetchScalar = MySQL.scalar.await
---@param query string
---@param parameters? MySQLParameters | fun(insertId: number)
---@param cb? fun(insertId: number)
function MySQL.insert(query, parameters, cb) end
MySQL.Async.insert = MySQL.insert
---@param query string
---@param parameters? MySQLParameters
---@return number insertId
---@async
function MySQL.insert.await(query, parameters) end
MySQL.Sync.insert = MySQL.insert.await
---@param queries MySQLTransaction
---@param parameters? MySQLParameters | fun(success: boolean)
---@param cb? fun(success: boolean)
function MySQL.transaction(queries, parameters, cb) end
MySQL.Async.transaction = MySQL.transaction
---@param queries MySQLTransaction
---@param parameters? MySQLParameters
---@return boolean success
---@async
function MySQL.transaction.await(queries, parameters) end
MySQL.Sync.transaction = MySQL.transaction.await
---@param query string
---@param parameters? MySQLParameters | fun(result?: MySQLColumn | MySQLRow | MySQLQuery)
---@param cb? fun(result?: MySQLColumn | MySQLRow | MySQLQuery)
function MySQL.prepare(query, parameters, cb) end
MySQL.Async.prepare = MySQL.prepare
---@param query string
---@param parameters? MySQLParameters
---@return MySQLColumn | MySQLRow | MySQLQuery | nil result
---@async
function MySQL.prepare.await(query, parameters) end
MySQL.Sync.prepare = MySQL.prepare.await
---@param query string
---@param parameters? MySQLParameters | fun(result?: MySQLQuery)
---@param cb? fun(result?: MySQLQuery)
function MySQL.rawExecute(query, parameters, cb) end
---@param query string
---@param parameters? MySQLParameters
---@return MySQLQuery? result
---@async
function MySQL.rawExecute.await(query, parameters) end
---@param cb function
function MySQL.ready(cb) end
---@async
function MySQL.ready.await() end
---@return boolean
function MySQL.isReady() end
---@return true
---@async
function MySQL.awaitConnection() end

View File

@ -0,0 +1,38 @@
// https://fivemanage.com/?ref=overextended
const apiKey = GetConvar('FIVEMANAGE_LOGS_API_KEY', '');
if (!apiKey) return console.warning(`convar "FIVEMANAGE_LOGS_API_KEY" has not been set`);
const batchedLogs = [];
const endpoint = 'https://api.fivemanage.com/api/logs/batch';
const headers = {
['Content-Type']: 'application/json',
['Authorization']: apiKey,
['User-Agent']: 'oxmysql',
};
async function sendLogs() {
try {
const body = JSON.stringify(batchedLogs);
batchedLogs.length = 0;
const response = await fetch(endpoint, {
method: 'POST',
body: body,
headers: headers,
});
if (response.ok) return;
console.error(`Failed to submit logs to fivemanage - ${response.status} ${response.statusText}`);
} catch (err) {
console.error(err);
}
}
return function logger(data) {
if (batchedLogs.length === 0) setTimeout(sendLogs, 500);
batchedLogs.push(data);
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte + TS</title>
<script type="module" crossorigin src="./assets/index-5e39ce18.js"></script>
<link rel="stylesheet" href="./assets/index-9bba0f49.css">
<script type="module" crossorigin src="./assets/index-95a76ebf.js"></script>
<link rel="stylesheet" href="./assets/index-37a4a4fa.css">
</head>
<body>
<div id="app"></div>