Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for latest DLCs #133

Merged
merged 8 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,31 @@ 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
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
end)
7 changes: 7 additions & 0 deletions dlc_chopshop/base.lua
Original file line number Diff line number Diff line change
@@ -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)
24 changes: 24 additions & 0 deletions dlc_chopshop/cargoship.lua
Original file line number Diff line number Diff line change
@@ -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
}
22 changes: 22 additions & 0 deletions dlc_chopshop/cartel_garage.lua
Original file line number Diff line number Diff line change
@@ -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
}
21 changes: 21 additions & 0 deletions dlc_chopshop/lifeguard.lua
Original file line number Diff line number Diff line change
@@ -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
}
115 changes: 115 additions & 0 deletions dlc_chopshop/salvage.lua
Original file line number Diff line number Diff line change
@@ -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.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
}
5 changes: 5 additions & 0 deletions dlc_drugwars/base.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CreateThread(function()
RequestIpl("xm3_collision_fixes")
RequestIpl("xm3_sum2_fix")
RequestIpl("xm3_security_fix")
end)
51 changes: 51 additions & 0 deletions dlc_drugwars/freakshop.lua
Original file line number Diff line number Diff line change
@@ -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.Load()

-- Interior
DrugWarsFreakshop.Door.Set(DrugWarsFreakshop.Door.closed, false)

RefreshInterior(DrugWarsFreakshop.interiorId)
end
}
Loading