OnEntityStreamOut

From GT-MP
Jump to: navigation, search
OnEntityStreamOut
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

This event is triggered when an entity is streamed out (if its too far away). (streaming distance is changeable in the settings.xml)

Syntax

API.onEntityStreamOut.connect(function (entity, entityType) {

});

Required Arguments

  • entity: the handle of the entity.
  • entityType: the type of the entity

Usage example(s)

API.onEntityStreamOut.connect(function (ent, entType) {

  if (entType === 1)
  { // if entity is a vehicle
    API.sendChatMessage(API.getLocalPlayer(), "a vehicle is gone!");
  }
});

References