_TASK_SUBMARINE_GOTO_AND_STOP
DocsTaskSubmarineGotoAndStop(p0, submarine, x, y, z, p5)Description
Introduced in build 2189
Used in am_vehicle_spawn.ysc and am_mp_submarine.ysc.
p0 is always 0, p5 is always 1
p1 is the vehicle handle of the submarine. Submarine must have a driver, but the ped handle is not passed to the native.
Speed can be set by calling SET_DRIVE_TASK_CRUISE_SPEED after
Parameters
| Name | Type | Description |
|---|---|---|
p0 | Any | — |
submarine | Vehicle | — |
x | float | — |
y | float | — |
z | float | — |
p5 | Any | — |
Quick Snippet: Get Coordinatesxyz
xyzAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Quick Snippet: Get Vehiclesubmarine
submarineUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaPed Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.