natives.drawCheckpoint: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Created page with "{{ScriptItem |endpoint = client |games = iv |type = function |name = natives.drawCheckpoint |parameters = float x, float y, float z, float radius, int r, int g, int b, int a |parameter1 = float x X coordinate of the checkpoint |parameter2 = float y Y coordinate of the checkpoint |parameter3 = float z Z coordinate of the checkpoint |parameter4 = float radius Radius of the checkpoint circle |parameter5 = int r Red component (0–255) |parameter6 = int g Green component (0...")
 
No edit summary
 
Line 4: Line 4:
|type = function
|type = function
|name = natives.drawCheckpoint
|name = natives.drawCheckpoint
|parameters = float x, float y, float z, float radius, int r, int g, int b, int a
|parameters = Vec3 position, float radius, int r, int g, int b, int a
|parameter1 = float x X coordinate of the checkpoint
|parameter1 = Vec3 position Coordinates of the checkpoint (x, y, z)
|parameter2 = float y Y coordinate of the checkpoint
|parameter2 = float radius Radius of the checkpoint circle
|parameter3 = float z Z coordinate of the checkpoint
|parameter3 = int r Red component (0–255)
|parameter4 = float radius Radius of the checkpoint circle
|parameter4 = int g Green component (0–255)
|parameter5 = int r Red component (0–255)
|parameter5 = int b Blue component (0–255)
|parameter6 = int g Green component (0–255)
|parameter6 = int a Alpha component (0–255)
|parameter7 = int b Blue component (0–255)
|usage = Draws a visual checkpoint marker at the given coordinates
|parameter8 = int a Alpha component (0–255)
|usage = Draw a visual checkpoint marker at given coordinates
|notes =  
|notes =  
- Must be called inside a rendering event such as [[OnDrawnHUD]] so the marker is drawn each frame
- Must be called inside a rendering event such as [[OnDrawnHUD]] so the marker is drawn each frame
- Color and radius allow customization of the checkpoint’s appearance
- Color and radius allow customization of the checkpoint’s appearance
|return1 = void
|return1 = void
|exampleJS = natives.drawCheckpoint(100.0, 200.0, 20.0, 3.0, 255, 0, 0, 200);
|exampleJS =  
const pos = new Vec3(100.0, 200.0, 20.0);
natives.drawCheckpoint(pos, 3.0, 255, 0, 0, 200);
}}
}}

Latest revision as of 22:11, 14 December 2025

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.drawCheckpoint(Vec3 position, float radius, int r, int g, int b, int a)

The natives.drawCheckpoint function is used to Draws a visual checkpoint marker at the given coordinates.

Parameters

1) Vec3 position Coordinates of the checkpoint (x, y, z).
2) float radius Radius of the checkpoint circle.
3) int r Red component (0–255).
4) int g Green component (0–255).
5) int b Blue component (0–255).
6) int a Alpha component (0–255).

Return

void This function doesn't return a value.

Notes

  • - Must be called inside a rendering event such as OnDrawnHUD so the marker is drawn each frame- Color and radius allow customization of the checkpoint’s appearance.

Examples

Example 1 - JavaScript:

const pos = new Vec3(100.0, 200.0, 20.0); natives.drawCheckpoint(pos, 3.0, 255, 0, 0, 200);

Compatibility

There isn't any compatibility information for this function.