Skip to content

The Chop Shop: Salvage Yard

Indra edited this page Apr 27, 2024 · 1 revision

Getting the main object to interact with the interior:

ChopShopSalvage = exports['bob74_ipl']:GetChopShopSalvageObject()

Coordinates

This interior can be found at:

X Y Z
1077.276 -2274.876 -50.000

Object structure

ChopShopSalvage
  +-- interiorId
  +-- Ipl
  |   +-- Exterior
  |      + ipl
  |      + Load()
  |      + Remove()
  +-- Style
  |   +-- basic
  |   +-- upgrade
  |   +-- Set(style, refresh)
  |   +-- Clear(refresh)
  +-- Lift1
  |   +-- down
  |   +-- up
  |   +-- Set(lift, refresh)
  |   +-- Clear(refresh)
  +-- Lift2
  |   +-- down
  |   +-- up
  |   +-- Set(lift, refresh)
  |   +-- Clear(refresh)
  +-- Tint
  |   +-- gray
  |   +-- red
  |   +-- blue
  |   +-- orange
  |   +-- yellow
  |   +-- green
  |   +-- pink
  |   +-- teal
  |   +-- darkGray
  |   +-- SetColor(color, refresh)
  +-- LoadDefault()

Exterior Ipls

Loading Ipls related files in game:

ChopShopSalvage.Ipl.Exterior.Load()

Removing Ipls from game:

ChopShopSalvage.Ipl.Exterior.Remove()

Style

Setting the interior style:

ChopShopSalvage.Style.Set(style, refresh)
Parameter Description Valid values
style Basic style ChopShopSalvage.Style.basic
Upgraded style ChopShopSalvage.Style.upgrade
refresh Refresh the whole interior true or false

Lift 1

Setting the first lift:

ChopShopSalvage.Lift1.Set(lift, refresh)
Parameter Description Valid values
lift Lift up ChopShopSalvage.Lift1.up
Lift down ChopShopSalvage.Lift1.down
refresh Refresh the whole interior true or false

Lift 2

Setting the second lift:

ChopShopSalvage.Lift2.Set(lift, refresh)
Parameter Description Valid values
lift Lift up ChopShopSalvage.Lift2.up
Lift down ChopShopSalvage.Lift2.down
refresh Refresh the whole interior true or false

Tint

Setting the interior tint:

ChopShopSalvage.Tint.SetColor(color, refresh)
Parameter Description Valid values
color White ChopShopSalvage.Tint.white
Gray ChopShopSalvage.Tint.gray
Red ChopShopSalvage.Tint.red
Blue ChopShopSalvage.Tint.blue
Orange ChopShopSalvage.Tint.orange
Yellow ChopShopSalvage.Tint.yellow
Green ChopShopSalvage.Tint.green
Pink ChopShopSalvage.Tint.pink
Teal ChopShopSalvage.Tint.teal
Dark gray ChopShopSalvage.Tint.darkGray
refresh Refresh the whole interior true or false

Default values set by bob74_ipl

LoadDefault = function()
	-- Exterior
	ChopShopSalvage.Ipl.Exterior.Load()

	-- Interior
	ChopShopSalvage.Tint.SetColor(ChopShopSalvage.Tint.gray, false)
	ChopShopSalvage.Style.Set(ChopShopSalvage.Style.upgrade, false)

	ChopShopSalvage.Lift1.Set(ChopShopSalvage.Lift1.up, false)
	ChopShopSalvage.Lift2.Set(ChopShopSalvage.Lift2.up, false)

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

    -- Disable the exterior
    ChopShopSalvage.Ipl.Exterior.Remove()

    -- Set the interior style
    ChopShopSalvage.Style.Set(ChopShopSalvage.Style.basic, false)

    -- Set the color
    ChopShopSalvage.Tint.SetColor(ChopShopSalvage.Tint.blue, false)

    -- Set the first lift down
    ChopShopSalvage.Lift1.Set(ChopShopSalvage.Lift1.down, false)

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