GTA V: Cargo ship - Bob74/bob74_ipl GitHub Wiki
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 |
bob74_ipl
Default values set by 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)