Skip to content

Executives & Other Criminals: Penthouses

Bob74 edited this page Sep 10, 2020 · 3 revisions

Executives & Other Criminals penthouses are all handled the same way. There are 3 of them, ExecApartment1, ExecApartment2 and ExecApartment3. I will be using ExecApartment1 as an example in this documentation. Replace it with the one you need.

Getting the main object to interact with the interior:

ExecApartment1 = exports['bob74_ipl']:GetExecApartment1Object()
ExecApartment2 = exports['bob74_ipl']:GetExecApartment2Object()
ExecApartment3 = exports['bob74_ipl']:GetExecApartment3Object()

Coordinates

These interiors can be found at:

X Y Z
Penthouse 1 (EclipseTowers, Penthouse Suite 1) -787.7805 334.9232 215.8384
Penthouse 2 (EclipseTowers, Penthouse Suite 2) -773.2258 322.8252 194.8862
Penthouse 3 (EclipseTowers, Penthouse Suite 3) -787.7805 334.9232 186.1134

Object structure

ExecApartment1
  +-- currentInteriorId
  +-- Style
  |   +-- Theme
  |      +-- modern
  |         +-- interiorId
  |         +-- ipl
  |      +-- moody
  |         +-- interiorId
  |         +-- ipl
  |      +-- vibrant
  |         +-- interiorId
  |         +-- ipl
  |      +-- sharp
  |         +-- interiorId
  |         +-- ipl
  |      +-- monochrome
  |         +-- interiorId
  |         +-- ipl
  |      +-- seductive
  |         +-- interiorId
  |         +-- ipl
  |      +-- regal
  |         +-- interiorId
  |         +-- ipl
  |      +-- aqua
  |         +-- interiorId
  |         +-- ipl
  |   +-- Set(style, refresh)
  |   +-- Clear()
  +-- Strip
  |   +-- A
  |   +-- B
  |   +-- C
  |   +-- Enable(details, state, refresh)
 +-- Booze
  |   +-- A
  |   +-- B
  |   +-- C
  |   +-- Enable(details, state, refresh)
 +-- Smoke
  |   +-- none
  |   +-- stage1
  |   +-- stage2
  |   +-- stage3
  |   +-- Set(smoke, refresh)
  |   +-- Clear(refresh)
  +-- LoadDefault()

Strip

Setting the interior's strip-tease clothes:

ExecApartment1.Strip.Enable(details, state, refresh)
Parameter Description Valid values
details Clothes on the ground, furnitures... ExecApartment1.Strip.A
Clothes on the ground, furnitures... ExecApartment1.Strip.B
Clothes on the ground, furnitures... ExecApartment1.Strip.C
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Booze

Setting the interior's bottles:

ExecApartment1.Booze.Enable(details, state, refresh)
Parameter Description Valid values
details Bottles here and there ExecApartment1.Booze.A
Bottles here and there ExecApartment1.Booze.B
Bottles here and there ExecApartment1.Booze.C
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Smoke

Setting the smoking state:

ExecApartment1.Smoke.Set(smoke, refresh)
Parameter Description Valid values
smoke No cigarettes added ExecApartment1.Smoke.none
A bit of cigarettes and empty ashtrays ExecApartment1.Smoke.stage1
More cigarettes and used ashtrays ExecApartment1.Smoke.stage2
Lot of cigarettes and full ashtrays ExecApartment1.Smoke.stage3
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
    ExecApartment1.Style.Set(ExecApartment1.Style.Theme.modern, true)
    ExecApartment1.Strip.Enable({ExecApartment1.Strip.A, ExecApartment1.Strip.B, ExecApartment1.Strip.C}, false)
    ExecApartment1.Booze.Enable({ExecApartment1.Booze.A, ExecApartment1.Booze.B, ExecApartment1.Booze.C}, false)
    ExecApartment1.Smoke.Set(ExecApartment1.Smoke.none)
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
    ExecApartment1 = exports['bob74_ipl']:GetExecApartment1Object()

    -- Enable all strip-tease clothes
    ExecApartment1.Strip.Enable({ExecApartment1.Strip.A, ExecApartment1.Strip.B, ExecApartment1.Strip.C}, true)

    -- Enable a bit of booze bottles
    ExecApartment1.Booze.Enable(ExecApartment1.Booze.A, true)

    -- Maximum amount of cigarettes + Refresh
    ExecApartment1.Smoke.Set(ExecApartment1.Smoke.stage3, true)
end)
Clone this wiki locally