Checkpoint
Defined in: server/api.d.ts:2453
A ring on the ground on every player’s screen, as FiveM resources draw a marker with CreateCheckpoint or DrawMarker: a translucent upright cylinder at a job’s pickup, a shop’s door, a race’s next gate. A player sees it while they are in its worldspace or interior and within its range. It shows the place; Zone.create with the same center and radius tells scripts who steps in. Move it with setPosition, not by setting position.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Checkpoint(
id):Checkpoint
Defined in: server/api.d.ts:2458
Wraps the checkpoint with this ID; it creates nothing.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Checkpoint
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
boolean
Defined in: server/api.d.ts:2469
Takes the checkpoint off every player’s screen.
Returns
Section titled “Returns”boolean
False once it is gone.
setColor()
Section titled “setColor()”setColor(
color):boolean
Defined in: server/api.d.ts:2482
Changes its color.
Parameters
Section titled “Parameters”number
0xRRGGBBAA; the alpha is the wall’s, the rim is drawn more solid.
Returns
Section titled “Returns”boolean
False once it is gone.
setPosition()
Section titled “setPosition()”setPosition(
position,space?):boolean
Defined in: server/api.d.ts:2497
Moves it.
Parameters
Section titled “Parameters”position
Section titled “position”The middle of its base, on the ground.
space?
Section titled “space?”{ worldSpace: number; } | { interiorCell: number; }
Where that is; its current space when left out.
Returns
Section titled “Returns”boolean
False once it is gone.
setRadius()
Section titled “setRadius()”setRadius(
radius):boolean
Defined in: server/api.d.ts:2489
Widens or narrows it.
Parameters
Section titled “Parameters”radius
Section titled “radius”number
Game units, above 0 and at most 5000.
Returns
Section titled “Returns”boolean
False once it is gone.
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:4292
Moves this entity into another virtual world.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: server/api.d.ts:4298
Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”toString()
Section titled “toString()”toString():
string
Defined in: server/api.d.ts:2475
Formats this handle for logging.
Returns
Section titled “Returns”string
The checkpoint’s network ID and radius.
Inherited from
Section titled “Inherited from”
staticall():Checkpoint[]
Defined in: server/api.d.ts:2510
Every checkpoint.
Returns
Section titled “Returns”Checkpoint[]
One handle per checkpoint.
create()
Section titled “create()”
staticcreate(options):Checkpoint|null
Defined in: server/api.d.ts:2504
Puts a ring on the ground for every player, or one player.
Parameters
Section titled “Parameters”options
Section titled “options”position: the middle of its base, on the ground. radius: 100 by default, at most 5000. height: how high its wall rises, 50 by default, 0 for a flat ring. color: 0xRRGGBBAA, a translucent amber by default. range: how far from a player it is drawn, 3000 by default, at most 20000. space: its worldspace or interior, the Commonwealth when left out. player: the one player who sees it, everyone when left out.
color?
Section titled “color?”number
height?
Section titled “height?”number
player?
Section titled “player?”position
Section titled “position”radius?
Section titled “radius?”number
range?
Section titled “range?”number
space?
Section titled “space?”{ worldSpace: number; } | { interiorCell: number; }
Returns
Section titled “Returns”Checkpoint | null
The checkpoint; null when it could not be made. Throws for options without a position, or a radius out of range.
Properties
Section titled “Properties”
readonlyid:number
Defined in: server/api.d.ts:4260
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”position
Section titled “position”position:
Vector3
Defined in: server/api.d.ts:4270
Authoritative world-space position; assignment forces replicated state.
Inherited from
Section titled “Inherited from”radius
Section titled “radius”
readonlyradius:number
Defined in: server/api.d.ts:2463
Its radius in game units; 0 once it is gone.
rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: server/api.d.ts:4275
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlystate:StateBag
Defined in: server/api.d.ts:4280
Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.
Inherited from
Section titled “Inherited from”virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:4265
Current virtual-world identifier.