From GT-MP
Jump to: navigation, search
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This event is triggered when entity data gets reset.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.


In Javascript
Client-Side Function

API.onEntityDataReset.connect((entity, key) => {

  • entity: parameter should be of LocalHandle type.
  • key: parameter should be of string type.

In C#
Server-Side Function

First of all, it should be defined in your Main constructor for it to be called, otherwise it wouldn't be initiated at all!

public Main()
    API.onEntityDataReset += OnEntityDataResetHandler;

public void OnEntityDataResetHandler(NetHandle entity, string key)
    // code

Usage example(s)