Skip to content

Checkpoint Functions

DizzasTeR edited this page Nov 16, 2020 · 4 revisions

Checkpoint


Class Static Functions

  • Checkpoint.type() — Returns Checkpoint type (string "Checkpoint")
  • Checkpoint.findByID(int id) — Returns a Checkpoint with the matching id, nil otherwise
  • Checkpoint.count() — Returns the total number of Checkpoint instances right now (Checkpoint count)
  • Checkpoint.getActive() — Returns a table of all checkpoints

Constructor(s)

Note: Player can be passed as nil to create the checkpoint for all players

Checkpoint:new(Player createFor, int world, bool isSphere, table position, table color4, float radius)
Checkpoint:new(Player createFor, int world, bool isSphere, float x, float y, float z, table color4, float radius)

Read-Only Methods

  • getType() — Same as static type
  • getID() — Return Checkpoint's ID

Methods

  • destroy() — Destroys and deletes the Checkpoint
  • streamedForPlayer(Player player) — Is the Checkpoint streamed for player or not (bool)
  • getOwner() — The owner player or nil/-1 if created for all
  • isSphere() — Is the Checkpoint a sphere or not

Properties

  • data — Table
  • position — Table
  • world — int
  • radius — float
  • color — table {r, g, b, a}
  • alpha — int

General Example

Clone this wiki locally