Skip to content

Bottom Dollar Bounties: Bail office

Indra edited this page Aug 11, 2024 · 1 revision

Getting the main object to interact with the interior:

SummerOffice = exports['bob74_ipl']:GetSummerOfficeObject()

Coordinates

This interior can be found at:

X Y Z
565.886 -2688.761 -50.0

Object structure

SummerOffice
  +-- interiorId
  +-- Ipl
  |   +-- Exterior
  |      + ipl
  |      + Load()
  |      + Remove()
  +-- Style
  |   +-- vintage
  |   +-- patterns
  |   +-- teak
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Desk
  |   +-- files
  |   +-- computers
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Gunsafe
  |   +-- cabinet
  |   +-- gunsafe
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Trophy
  |   +-- plaque
  |   +-- badge
  |   +-- handcuffs
  |   +-- Enable(tropy, state, refresh)
  +-- Plant
  |   +-- plant
  |   +-- Enable(state, refresh)
  +-- LoadDefault()

Default values set by bob74_ipl

LoadDefault = function()
	SummerOffice.Ipl.Exterior.Load()

	SummerOffice.Style.Set(SummerOffice.Style.teak, false)
	SummerOffice.Desk.Set(SummerOffice.Desk.files, false)
	SummerOffice.Gunsafe.Set(SummerOffice.Gunsafe.cabinet, false)

	SummerOffice.Trophy.Enable(SummerOffice.Trophy.plaque, true, false)
	SummerOffice.Trophy.Enable(SummerOffice.Trophy.badge, true, false)
	SummerOffice.Trophy.Enable(SummerOffice.Trophy.handcuffs, true, false)

	SummerOffice.Plant.Enable(true, false)

	RefreshInterior(SummerOffice.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
    SummerOffice = exports['bob74_ipl']:GetSummerOfficeObject()

    -- Set the style
    SummerOffice.Style.Set(SummerOffice.Style.vintage, true)

    -- Remove the plant
    SummerOffice.Plant.Enable(false, true)
end)
Clone this wiki locally