startShapeTestMouseCursorLosProbe
START_SHAPE_TEST_MOUSE_CURSOR_LOS_PROBE0xFF6BE494C7987F34The GTA V native START_SHAPE_TEST_MOUSE_CURSOR_LOS_PROBE of the SHAPETEST namespace, as LS:MP client scripts call it: the global function startShapeTestMouseCursorLosProbe, in JavaScript and in Lua.
startShapeTestMouseCursorLosProbe(
flag: number,
entity: Entity,
flag2: number
): [
result: number,
pVec1: { x: number, y: number, z: number },
pVec2: { x: number, y: number, z: number }
]startShapeTestMouseCursorLosProbe(
flag: integer,
entity: Entity,
flag2: integer
): integer, Vector3, Vector3Usage
JavaScript
const [result, pVec1, pVec2] = startShapeTestMouseCursorLosProbe(flag, entity, flag2);Lua
local result, pVec1, pVec2 = startShapeTestMouseCursorLosProbe(flag, entity, flag2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
flag | int | number | integer |
entity | Entity | number | integer |
flag2 | int | number | integer |
Returns
3 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | result | int | number | integer | The native’s own return value. |
| 2 | pVec1 | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
| 3 | pVec2 | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
On LS:MP
ℹ
Input while LS:MP has the focus
While the LS:MP menu, the console or a focused browser holds the keyboard and mouse, this native does not reach the game: it returns 0.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns a ShapeTest handle that can be used with getShapeTestResult.
In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7
Reference
- Namespace
- Shape tests SHAPETEST
- In the game
int START_SHAPE_TEST_MOUSE_CURSOR_LOS_PROBE(Vector3* pVec1, Vector3* pVec2, int flag, Entity entity, int flag2)- Hash
0xFF6BE494C7987F34- Formerly
_START_SHAPE_TEST_SURROUNDING_COORDS