Skip to content

GTA V: Trevor's trailer

Bob74 edited this page Jan 14, 2019 · 1 revision

Getting the main object to interact with the interior:

TrevorsTrailer = exports['bob74_ipl']:GetTrevorsTrailerObject()

Coordinates

This interior can be found at:

X Y Z
1985.48132 3828.76757 32.5

Object structure

TrevorsTrailer
  +-- interiorId
  +-- Interior
  |   +-- tidy
  |   +-- trash
  |   +-- Set(interior)
  |   +-- Clear()
  +-- Details
  |   +-- copHelmet
  |   +-- briefcase
  |   +-- michaelStuff
  |   +-- Enable(details, state, refresh)
  +-- LoadDefault()

Interior

Set the interior to tidy or trashy:

TrevorsTrailer.Interior.Set(interior)
Parameter Description Valid values
interior Interior state TrevorsTrailer.Interior.tidy or TrevorsTrailer.Interior.trash

Details (Trashy interior only)

Enable or disable some interior related details:

TrevorsTrailer.Details.Enable(details, state, refresh)
Parameter Description Valid values
details Cop helmet in the closet TrevorsTrailer.Details.copHelmet
Briefcase in the main room TrevorsTrailer.Details.briefcase
Michael's suit hanging on the window TrevorsTrailer.Details.michaelStuff
state Enabled or disabled true or false
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
    TrevorsTrailer.Interior.Set(TrevorsTrailer.Interior.trash)
    TrevorsTrailer.Details.Enable(TrevorsTrailer.Details.copHelmet, false, false)
    TrevorsTrailer.Details.Enable(TrevorsTrailer.Details.briefcase, false, false)
    TrevorsTrailer.Details.Enable(TrevorsTrailer.Details.michaelStuff, false, false)
    RefreshInterior(TrevorsTrailer.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
    TrevorsTrailer = exports['bob74_ipl']:GetTrevorsTrailerObject()

    -- Set the tidy interior
    TrevorsTrailer.Interior.Set(TrevorsTrailer.Interior.tidy)
end)
Clone this wiki locally