Skip to content
DizzasTeR edited this page Nov 16, 2020 · 5 revisions

Object


Class Static Functions

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

Constructor(s)

Object:new(int model, int world, float x, float y, float z [, int alpha = 255])
Object:new(int model, int world, table transform)

Read-Only Methods

  • getType() — Same as static type
  • getID() — Return object's ID
  • getModel() - Return object's Model

Methods

  • destroy() — Destroys and deletes the vehicle
  • streamedForPlayer(Player player) — Is the object streamed for player or not (bool)
  • setAlpha(int alpha [, int duration = 0])
  • moveTo:
    • moveTo(int x, int y, int z [, int duration = 0])
    • moveTo(table position [, int duration = 0])
    • moveTo(table transform)
  • moveBy:
    • moveBy(int x, int y, int z [, int duration = 0])
    • moveBy(table rotation [, int duration = 0])
    • moveBy(table transform)
  • rotateTo:
    • rotateTo(table rotation [, int duration = 0]) (rw can be -1 to use Euler Rotation)
  • rotateBy:
    • rotateBy(table rotation [, int duration = 0]) (rw can be -1 to use Euler Rotation)

Properties

  • data — Table
  • position — Table
  • angle — Table
  • world — int
  • trackShots — bool
  • trackTouch — bool

General Example

Clone this wiki locally