Skip to content

Commit a65f696

Browse files
authored
Merge pull request #133 from TheIndra55/master
Add support for latest DLCs
2 parents 807a085 + fde82c7 commit a65f696

File tree

16 files changed

+531
-1
lines changed

16 files changed

+531
-1
lines changed

client.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,31 @@ Citizen.CreateThread(function()
175175
CriminalEnterpriseVehicleWarehouse.LoadDefault() -- 800.13696, -3001.4297, -65.14074
176176
CriminalEnterpriseWarehouse.LoadDefault() -- 849.1047, -3000.209, -45.974354
177177
end
178+
179+
-- ====================================================================
180+
-- =------------------- [DLC: Los Santos Drug Wars] ------------------=
181+
-- ====================================================================
182+
if GetGameBuildNumber() >= 2802 then
183+
DrugWarsFreakshop.LoadDefault() -- 570.9713, -420.0727, -70.000
184+
DrugWarsGarage.LoadDefault() -- 519.2477, -2618.788, -50.000
185+
DrugWarsLab.LoadDefault() -- 483.4252, -2625.071, -50.000
186+
end
187+
188+
-- ====================================================================
189+
-- =------------------- [DLC: San Andreas Mercenaries] ---------------=
190+
-- ====================================================================
191+
if GetGameBuildNumber() >= 2944 then
192+
MercenariesClub.LoadDefault() -- 1202.407, -3251.251, -50.000
193+
MercenariesLab.LoadDefault() -- -1916.119, 3749.719, -100.000
194+
end
195+
196+
-- ====================================================================
197+
-- =------------------- [DLC: The Chop Shop] -------------------------=
198+
-- ====================================================================
199+
if GetGameBuildNumber() >= 3095 then
200+
ChopShopCargoShip.LoadDefault() -- -344.4349, -4062.832, 17.000
201+
ChopShopCartelGarage.LoadDefault() -- 1220.133, -2277.844, -50.000
202+
ChopShopLifeguard.LoadDefault() -- -1488.153, -1021.166, 5.000
203+
ChopShopSalvage.LoadDefault() -- 1077.276, -2274.876, -50.000
204+
end
178205
end)

dlc_chopshop/base.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CreateThread(function()
2+
RequestIpl("m23_2_acp_collision_fixes_01")
3+
RequestIpl("m23_2_acp_collision_fixes_02")
4+
RequestIpl("m23_2_tug_collision")
5+
RequestIpl("m23_2_hei_yacht_collision_fixes")
6+
RequestIpl("m23_2_vinewood_garage")
7+
end)

dlc_chopshop/cargoship.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- Cargo ship: -344.4349, -4062.832, 17.000
2+
exports('GetChopShopCargoShipObject', function()
3+
return ChopShopCargoShip
4+
end)
5+
6+
ChopShopCargoShip = {
7+
Ipl = {
8+
ipl = {
9+
"m23_2_cargoship",
10+
"m23_2_cargoship_bridge"
11+
},
12+
13+
Load = function()
14+
EnableIpl(ChopShopCargoShip.Ipl.ipl, true)
15+
end,
16+
Remove = function()
17+
EnableIpl(ChopShopCargoShip.Ipl.ipl, false)
18+
end
19+
},
20+
21+
LoadDefault = function()
22+
ChopShopCargoShip.Ipl.Load()
23+
end
24+
}

dlc_chopshop/cartel_garage.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- Cartel Garage: 1220.133, -2277.844, -50.000
2+
exports('GetChopShopCartelGarageObject', function()
3+
return ChopShopCartelGarage
4+
end)
5+
6+
ChopShopCartelGarage = {
7+
interiorId = 293633,
8+
9+
Entities = {
10+
entities = "mp2023_02_dlc_int_6_cb",
11+
12+
Enable = function(state, refresh)
13+
SetIplPropState(ChopShopCartelGarage.interiorId, ChopShopCartelGarage.Entities.entities, state, refresh)
14+
end
15+
},
16+
17+
LoadDefault = function()
18+
ChopShopCartelGarage.Entities.Enable(true, false)
19+
20+
RefreshInterior(ChopShopCartelGarage.interiorId)
21+
end
22+
}

dlc_chopshop/lifeguard.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- Lifeguard: -1488.153, -1021.166, 5.000
2+
exports('GetChopShopLifeguardObject', function()
3+
return ChopShopLifeguard
4+
end)
5+
6+
ChopShopLifeguard = {
7+
Ipl = {
8+
ipl = "m23_2_lifeguard_access",
9+
10+
Load = function()
11+
EnableIpl(ChopShopLifeguard.Ipl.ipl, true)
12+
end,
13+
Remove = function()
14+
EnableIpl(ChopShopLifeguard.Ipl.ipl, false)
15+
end
16+
},
17+
18+
LoadDefault = function()
19+
ChopShopLifeguard.Ipl.Load()
20+
end
21+
}

dlc_chopshop/salvage.lua

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
-- Salvage Yard: 1077.276, -2274.876, -50.000
2+
exports('GetChopShopSalvageObject', function()
3+
return ChopShopSalvage
4+
end)
5+
6+
ChopShopSalvage = {
7+
interiorId = 293377,
8+
9+
Ipl = {
10+
Exterior = {
11+
ipl = {
12+
"m23_2_sp1_03_reds",
13+
"m23_2_sc1_03_reds",
14+
"m23_2_id2_04_reds",
15+
"m23_2_cs1_05_reds",
16+
"m23_2_cs4_11_reds",
17+
}
18+
},
19+
20+
Load = function()
21+
EnableIpl(ChopShopSalvage.Ipl.Exterior.ipl, true)
22+
end,
23+
Remove = function()
24+
EnableIpl(ChopShopSalvage.Ipl.Exterior.ipl, false)
25+
end
26+
},
27+
28+
Style = {
29+
basic = {
30+
"set_mechanic_basic",
31+
"set_safe_basic"
32+
},
33+
upgrade = {
34+
"set_mechanic_upgrade",
35+
"set_safe_upgrade"
36+
},
37+
38+
Set = function(style, refresh)
39+
ChopShopSalvage.Style.Clear(false)
40+
41+
SetIplPropState(ChopShopSalvage.interiorId, style, true, refresh)
42+
end,
43+
Clear = function(refresh)
44+
SetIplPropState(ChopShopSalvage.interiorId, {
45+
ChopShopSalvage.Style.basic,
46+
ChopShopSalvage.Style.upgrade
47+
}, false, refresh)
48+
end
49+
},
50+
51+
Lift1 = {
52+
down = "set_car_lift_01_down",
53+
up = "set_car_lift_01_up",
54+
55+
Set = function(lift, refresh)
56+
ChopShopSalvage.Lift1.Clear(false)
57+
58+
SetIplPropState(ChopShopSalvage.interiorId, lift, true, refresh)
59+
end,
60+
Clear = function(refresh)
61+
SetIplPropState(ChopShopSalvage.interiorId, {
62+
ChopShopSalvage.Lift1.down,
63+
ChopShopSalvage.Lift1.up
64+
}, false, refresh)
65+
end
66+
},
67+
68+
Lift2 = {
69+
down = "set_car_lift_02_down",
70+
up = "set_car_lift_02_up",
71+
72+
Set = function(lift, refresh)
73+
ChopShopSalvage.Lift2.Clear(false)
74+
75+
SetIplPropState(ChopShopSalvage.interiorId, lift, true, refresh)
76+
end,
77+
Clear = function(refresh)
78+
SetIplPropState(ChopShopSalvage.interiorId, {
79+
ChopShopSalvage.Lift2.down,
80+
ChopShopSalvage.Lift2.up
81+
}, false, refresh)
82+
end
83+
},
84+
85+
Tint = {
86+
gray = 1,
87+
red = 2,
88+
blue = 3,
89+
orange = 4,
90+
yellow = 5,
91+
green = 6,
92+
pink = 7,
93+
teal = 8,
94+
darkGray = 9,
95+
96+
SetColor = function(color, refresh)
97+
SetIplPropState(ChopShopSalvage.interiorId, "set_tint_b", true, refresh)
98+
SetInteriorEntitySetColor(ChopShopSalvage.interiorId, "set_tint_b", color)
99+
end
100+
},
101+
102+
LoadDefault = function()
103+
-- Exterior
104+
ChopShopSalvage.Ipl.Load()
105+
106+
-- Interior
107+
ChopShopSalvage.Tint.SetColor(ChopShopSalvage.Tint.gray, false)
108+
ChopShopSalvage.Style.Set(ChopShopSalvage.Style.upgrade, false)
109+
110+
ChopShopSalvage.Lift1.Set(ChopShopSalvage.Lift1.up, false)
111+
ChopShopSalvage.Lift2.Set(ChopShopSalvage.Lift2.up, false)
112+
113+
RefreshInterior(ChopShopSalvage.interiorId)
114+
end
115+
}

dlc_drugwars/base.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CreateThread(function()
2+
RequestIpl("xm3_collision_fixes")
3+
RequestIpl("xm3_sum2_fix")
4+
RequestIpl("xm3_security_fix")
5+
end)

dlc_drugwars/freakshop.lua

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
-- Freakshop: 570.9713, -420.0727, -70.000
2+
exports('GetDrugWarsFreakshopObject', function()
3+
return DrugWarsFreakshop
4+
end)
5+
6+
DrugWarsFreakshop = {
7+
interiorId = 290817,
8+
9+
Ipl = {
10+
Exterior = {
11+
ipl = {
12+
"xm3_warehouse",
13+
"xm3_warehouse_grnd"
14+
}
15+
},
16+
17+
Load = function()
18+
EnableIpl(DrugWarsFreakshop.Ipl.Exterior.ipl, true)
19+
end,
20+
Remove = function()
21+
EnableIpl(DrugWarsFreakshop.Ipl.Exterior.ipl, false)
22+
end
23+
},
24+
25+
Door = {
26+
opened = "entity_set_roller_door_open",
27+
closed = "entity_set_roller_door_closed",
28+
29+
Set = function(door, refresh)
30+
DrugWarsFreakshop.Door.Clear()
31+
32+
SetIplPropState(DrugWarsFreakshop.interiorId, door, true, refresh)
33+
end,
34+
Clear = function(refresh)
35+
SetIplPropState(DrugWarsFreakshop.interiorId, {
36+
DrugWarsFreakshop.Door.opened,
37+
DrugWarsFreakshop.Door.closed
38+
}, false, refresh)
39+
end
40+
},
41+
42+
LoadDefault = function()
43+
-- Exterior
44+
DrugWarsFreakshop.Ipl.Load()
45+
46+
-- Interior
47+
DrugWarsFreakshop.Door.Set(DrugWarsFreakshop.Door.closed, false)
48+
49+
RefreshInterior(DrugWarsFreakshop.interiorId)
50+
end
51+
}

0 commit comments

Comments
 (0)