Skip to content

GTA V: Michael's house

Bob74 edited this page Nov 2, 2018 · 2 revisions

Getting the main object to interact with the interior:

Michael = exports['bob74_ipl']:GetMichaelObject()

Coordinates

This interior can be found at:

X Y Z
-802.311 175.056 72.8446

Object structure

Michael
  +-- interiorId
  +-- garageId
  +-- Style
  |   +-- normal
  |   +-- moved
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Bed
  |   +-- tidy
  |   +-- messy
  |   +-- Set(bed, refresh)
  |   +-- Clear(refresh)
  +-- Garage
  |   +-- scuba
  |   +-- Enable(scuba, state, refresh)
  +-- Details
  |   +-- moviePoster
  |   +-- fameShamePoste
  |   +-- planeTicket
  |   +-- spyGlasses
  |   +-- bugershot
  |   +-- Enable(details, state, refresh)
  +-- LoadDefault()

Style

Setting the interior's style:

Michael.Style.Set(style, refresh)
Parameter Description Valid values
style House state normal Michael.Style.normal
House state after the family has left Michael.Style.moved
refresh Refresh the whole interior true or false

Removing the interior's style:

Michael.Style.Clear(refresh)

Bed

Setting the bed state:

Michael.Bed.Set(bed, refresh)
Parameter Description Valid values
bed Tidy bed Michael.Bed.tidy
Messy bed Michael.Bed.messy
refresh Refresh the whole interior true or false

Removing bed's state:

Michael.Bed.Clear(refresh)

Garage

Enable or disable some garage related details:

Michael.Details.Enable(scuba, state, refresh)
Parameter Description Valid values
scuba Scuba gear Michael.Garage.scuba
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Details

Enable or disable some interior related details:

Michael.Details.Enable(details, state, refresh)
Parameter Description Valid values
details Meltdown movie poster Michael.Details.moviePoster
Next to Tracey's bed Michael.Details.fameShamePoste
Plane ticket Michael.Details.planeTicket
On the shelf inside Michael's bedroom Michael.Details.spyGlasses
Bag and cup in the kitchen, next to the sink Michael.Details.bugershot
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
    Michael.Garage.Enable(Michael.Garage.scuba, false, true)
    Michael.Style.Set(Michael.Style.normal)
    Michael.Bed.Set(Michael.Bed.tidy)
    Michael.Details.Enable(Michael.Details.moviePoster, false)
    Michael.Details.Enable(Michael.Details.fameShamePoste, false)
    Michael.Details.Enable(Michael.Details.spyGlasses, false)
    Michael.Details.Enable(Michael.Details.planeTicket, false)
    Michael.Details.Enable(Michael.Details.bugershot, false)
    RefreshInterior(Michael.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
    Michael = exports['bob74_ipl']:GetMichaelObject()

    -- Scuba gear in the garage
    Michael.Garage.Enable(Michael.Garage.scuba, false, true)

    -- Set the house to messy (after the family left)
    Michael.Style.Set(Michael.Style.moved)

    -- Set the bed to messy too
    Michael.Bed.Set(Michael.Bed.messy)

    -- Enable Michael's movie poster upstair
    Michael.Details.Enable(Michael.Details.moviePoster, true)

    -- Enable Fame or Shame poster in Tracey's rorm
    Michael.Details.Enable(Michael.Details.fameShamePoste, true)

    -- Enable spyglasses on Michael's bedroom shelf
    Michael.Details.Enable(Michael.Details.spyGlasses, true)

    -- Plane tickets on the shelf in the corridor
    Michael.Details.Enable(Michael.Details.planeTicket, true)

    -- Put burger shots bags and cup in the kitchen
    Michael.Details.Enable(Michael.Details.bugershot, true)
    
    RefreshInterior(Michael.interiorId)

end)
Clone this wiki locally