High Life: High end apartments - Bob74/bob74_ipl GitHub Wiki
High life's apartments are all handled the same way. There are 6 of them, from HLApartment1
to HLApartment6
.
I will be using HLApartment1
as an example in this documentation. Replace it with the one you need.
Getting the main object to interact with the interior:
HLApartment1 = exports['bob74_ipl']:GetHLApartment1Object()
HLApartment2 = exports['bob74_ipl']:GetHLApartment2Object()
HLApartment3 = exports['bob74_ipl']:GetHLApartment3Object()
HLApartment4 = exports['bob74_ipl']:GetHLApartment4Object()
HLApartment5 = exports['bob74_ipl']:GetHLApartment5Object()
HLApartment6 = exports['bob74_ipl']:GetHLApartment6Object()
Coordinates
These interiors can be found at:
X | Y | Z | |
---|---|---|---|
Dell Perro Heights, Apt 4 | -1468.14 | -541.815 | 73.4442 |
Richard Majestic, Apt 2 | -915.811 | -379.432 | 113.6748 |
Tinsel Towers, Apt 42 | -614.86 | 40.6783 | 97.60007 |
EclipseTowers, Apt 3 | -773.407 | 341.766 | 211.397 |
4 Integrity Way, Apt 28 | -18.07856 | -583.6725 | 79.46569 |
??? | -609.5669 | 51.28212 | -183.9808 |
Object structure
HLApartment1
+-- interiorId
+-- Ipl
| +-- Interior
| +-- ipl
| +-- Load()
| +-- Remove()
+-- Strip
| +-- A
| +-- B
| +-- C
| +-- Enable(details, state, refresh)
+-- Booze
| +-- A
| +-- B
| +-- C
| +-- Enable(details, state, refresh)
+-- Smoke
| +-- A
| +-- B
| +-- C
| +-- Enable(details, state, refresh)
+-- LoadDefault()
Interior Ipls
Loading Ipls related files in game:
HLApartment1.Ipl.Interior.Load()
Removing Ipls from game:
HLApartment1.Ipl.Interior.Remove()
Strip
Setting the interior's strip-tease clothes:
HLApartment1.Strip.Enable(details, state, refresh)
Parameter | Description | Valid values |
---|---|---|
details | Clothes on the ground, furnitures... | HLApartment1.Strip.A |
Clothes on the ground, furnitures... | HLApartment1.Strip.B |
|
Clothes on the ground, furnitures... | HLApartment1.Strip.C |
|
state | Enabled or disabled | true or false |
refresh | Refresh the whole interior | true or false |
Booze
Setting the interior's bottles:
HLApartment1.Booze.Enable(details, state, refresh)
Parameter | Description | Valid values |
---|---|---|
details | Bottles here and there | HLApartment1.Booze.A |
Bottles here and there | HLApartment1.Booze.B |
|
Bottles here and there | HLApartment1.Booze.C |
|
state | Enabled or disabled | true or false |
refresh | Refresh the whole interior | true or false |
Smoke
Setting the interior's bottles:
HLApartment1.Booze.Enable(details, state, refresh)
Parameter | Description | Valid values |
---|---|---|
details | Cigarettes and cigarettes packs | HLApartment1.Smoke.A |
Cigarettes and cigarettes packs | HLApartment1.Smoke.B |
|
Cigarettes and cigarettes packs | HLApartment1.Smoke.C |
|
state | Enabled or disabled | true or false |
refresh | Refresh the whole interior | true or false |
bob74_ipl
Default values set by LoadDefault = function()
HLApartment1.Ipl.Interior.Load()
HLApartment1.Strip.Enable({HLApartment1.Strip.A, HLApartment1.Strip.B, HLApartment1.Strip.C}, false)
HLApartment1.Booze.Enable({HLApartment1.Booze.A, HLApartment1.Booze.B, HLApartment1.Booze.C}, false)
HLApartment1.Smoke.Enable({HLApartment1.Smoke.A, HLApartment1.Smoke.B, HLApartment1.Smoke.C}, false)
RefreshInterior(HLApartment1.interiorId)
end
Example: How to use in your own resources
You can handle and customize the interiors in your own resources using the exported functions:
Citizen.CreateThread(function()
-- Getting the object to interact with
HLApartment1 = exports['bob74_ipl']:GetHLApartment1Object()
-- Enable all strip-tease clothes
HLApartment1.Strip.Enable({HLApartment1.Strip.A, HLApartment1.Strip.B, HLApartment1.Strip.C}, true)
-- Enable a bit of booze bottles
HLApartment1.Booze.Enable(HLApartment1.Booze.A, true)
-- Enable a bit of cigarettes
HLApartment1.Smoke.Enable({HLApartment1.Smoke.A, HLApartment1.Smoke.B}, true)
RefreshInterior(HLApartment1.interiorId)
end)