taskSubmarineGotoAndStop
TASK_SUBMARINE_GOTO_AND_STOP0xC22B40579A498CA4The GTA V native TASK_SUBMARINE_GOTO_AND_STOP of the TASK namespace, as LS:MP client scripts call it: the global function taskSubmarineGotoAndStop, in JavaScript and in Lua.
taskSubmarineGotoAndStop(
ped: Ped,
submarine: Vehicle,
x: number,
y: number,
z: number,
autopilot: boolean
): voidtaskSubmarineGotoAndStop(
ped: Ped,
submarine: Vehicle,
x: number,
y: number,
z: number,
autopilot: boolean
)Usage
JavaScript
taskSubmarineGotoAndStop(ped, submarine, x, y, z, autopilot);Lua
taskSubmarineGotoAndStop(ped, submarine, x, y, z, autopilot)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
taskSubmarineGotoAndStop(ped, submarine, pos, autopilot);Lua · with vectors
taskSubmarineGotoAndStop(ped, submarine, pos, autopilot)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
submarine | Vehicle | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
autopilot | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
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 setDriveTaskCruiseSpeed after
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_SUBMARINE_GOTO_AND_STOP(Ped ped, Vehicle submarine, float x, float y, float z, BOOL autopilot)- Hash
0xC22B40579A498CA4- Introduced
- Game build 2189 legacy numbering