SetEntityData

From GT-MP
Jump to: navigation, search
SetEntityData
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Sets the given data value on the entity. This does not synchronize the data to clients. Use setEntitySyncedData if you want this value to synchronize to clients.

Syntax

API.setEntityData(NetHandle entity, string key, object value);

Required Arguments

  • entity: parameter input should be in NetHandle type.
  • key: parameter input should be in string type.
  • value: parameter input should be in object type.

NOTE: This function returns data in bool type.

Usage example(s)

Example Description

API.setEntityData(player.handle, "Jailtime", 50);

OOP

player.setData("Jailtime", 50);


References