Documentation

Checkpoint

Constructible This class can be instantiated from your script. You can find more information on the Constructor below. Auto Destroy To delete an instance of this class, use the `Destroy` function of this class. You can find the function definition below. Custom Properties You can extend instances of this class with your own properties.

Constructor

Checkpoint(number type, number modelHash, Vector3f position, Vector3f rotation)

  • type: the type of the checkpoint
  • modelHash: the modelHash the checkpoint should use
  • position: the position, where the checkpoint is created at
  • rotation: optional the rotation of the checkpoint

Example

var checkpoint = new Checkpoint();

Properties

Name Type Description
modelHash number model hash of the Checkpoint (TODO: reference to all hashes)
networkId number read only the network id of this entity. It is not unique across different entities and will be re-assigned once this entity was destroyed
position Vector3f the Checkpoint's position in the game world
rotation Vector3f the Checkpoint's rotation in the game world
radius number radius of the Checkpoint
visible boolean whether the Checkpoint is visible to all Players.
dimension number world dimension of the Checkpoint.

Functions

Checkpoint.SetVisibleForPlayer(Player player, boolean visible)

Sets the visibility of the Checkpoint for a certain Player

Parameter

Name Type Description
player Player target Player
visible boolean whether the Checkpoint should be visible (`true` = visible, `false` = not visible)

Checkpoint.IsVisibleForPlayer(Player player)

Returns whether the Checkpoint is visible for a certain Player

  • true = visible
  • false = not visible

returns: boolean

Parameter

Name Type Description
player Player target Player

Checkpoint.Destroy()

Destroys the Checkpoint

Stay informed

By becoming the newest member of our growing forums, we and hundreds of other players will always keep you up to date on everything JC3:MP related.