Skip to content

GTA Online: High end apartments

Bob74 edited this page Nov 2, 2018 · 4 revisions

GTA online high end apartments are all handled the same way. There are 2 of them, GTAOApartmentHi1 and GTAOApartmentHi2. I will be using GTAOApartmentHi1 as an example in this documentation. Replace it with the one you need.

Getting the main object to interact with the interior:

GTAOApartmentHi1 = exports['bob74_ipl']:GetGTAOApartmentHi1Object()
GTAOApartmentHi2 = exports['bob74_ipl']:GetGTAOApartmentHi2Object()

Coordinates

These interiors can be found at:

X Y Z
High end Apartment 1 (4 Integrity Way, Apt 30) -35.31277 -580.4199 88.71221
High end Apartment 2 (Dell Perro Heights, Apt 7) -1477.14 -538.7499 55.5264

Object structure

GTAOApartmentHi1
  +-- interiorId
  +-- 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()

Strip

Setting the interior's strip-tease clothes:

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

Booze

Setting the interior's bottles:

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

Smoke

Setting the interior's bottles:

GTAOApartmentHi1.Booze.Enable(details, state, refresh)
Parameter Description Valid values
details Cigarettes and cigarettes packs GTAOApartmentHi1.Smoke.A
Cigarettes and cigarettes packs GTAOApartmentHi1.Smoke.B
Cigarettes and cigarettes packs GTAOApartmentHi1.Smoke.C
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
    GTAOApartmentHi1.Strip.Enable({GTAOApartmentHi1.Strip.A, GTAOApartmentHi1.Strip.B, GTAOApartmentHi1.Strip.C}, false)
    GTAOApartmentHi1.Booze.Enable({GTAOApartmentHi1.Booze.A, GTAOApartmentHi1.Booze.B, GTAOApartmentHi1.Booze.C}, false)
    GTAOApartmentHi1.Smoke.Enable({GTAOApartmentHi1.Smoke.A, GTAOApartmentHi1.Smoke.B, GTAOApartmentHi1.Smoke.C}, false)
    RefreshInterior(GTAOApartmentHi1.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
    GTAOApartmentHi1 = exports['bob74_ipl']:GetGTAOApartmentHi1Object()

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

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

    -- Enable a bit of cigarettes
    GTAOApartmentHi1.Smoke.Enable({GTAOApartmentHi1.Smoke.A, GTAOApartmentHi1.Smoke.B}, false)

    RefreshInterior(GTAOApartmentHi1.interiorId)
end)
Clone this wiki locally