Skip to content

GTA V: Cargo ship

Indra edited this page Apr 14, 2024 · 1 revision

Getting the main object to interact with the interior:

CargoShip = exports['bob74_ipl']:GetCargoShipObject()

Coordinates

This ipl can be found at:

X Y Z
-168.1825 -2364.8259 20.000

Object structure

CargoShip
  +-- State
  |   +-- normal
  |   +-- sunk
  |   +-- Set(state)
  |   +-- Clear()
  +-- LoadDefault()

State

Setting the ship state:

CargoShip.State.Set(state)
Parameter Description Valid values
state Normal CargoShip.State.normal
Sunk CargoShip.State.sunk

Default values set by bob74_ipl

LoadDefault = function()
    CargoShip.State.Set(CargoShip.State.normal)
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
    CargoShip = exports['bob74_ipl']:GetCargoShipObject()

    -- Seting the ship as sunk
    CargoShip.State.Set(CargoShip.State.sunk)
end)
Clone this wiki locally