Skip to main content

GetEntityData

Gets entity data that was set with SetEntityData.

Note that this data is in a different state than synced data that you set with SetEntitySharedData. To get synced data, use GetEntitySharedData instead.

Syntax

```csharp dynamic NAPI.Data.GetEntityData(Entity entity, string key); ```

Required Arguments

  • entity: parameter input should be in Entity type.
  • key: parameter input should be in string type.

NOTE: This function returns data in dynamic type.

Usage example(s)

```csharp // Note: Since the return type is dynamic, this will throw an exception if the data is not of type int! int jailtime = NAPI.Data.GetEntityData(player, "Jailtime"); ```