SetEntityData: Difference between revisions
m (Xabi moved page NAPI.Data.SetEntityData to SetEntityData) |
No edit summary |
||
| Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="C#" >void NAPI.Data.SetEntityData( | <syntaxhighlight lang="C#" >void NAPI.Data.SetEntityData(Entity entity, string key, object value);</syntaxhighlight> | ||
'''Required Arguments''' | '''Required Arguments''' | ||
*'''entity:''' parameter input should be in ''' | *'''entity:''' parameter input should be in '''Entity''' type. | ||
*'''key:''' parameter input should be in '''string''' type. | *'''key:''' parameter input should be in '''string''' type. | ||
*'''value:''' parameter input can be of any type. | *'''value:''' parameter input can be of any type. | ||
Latest revision as of 19:34, 22 December 2022
Sets the given data value on the entity. This does not synchronize the data to clients. Use SetEntitySharedData if you want this value to synchronize to clients.
Syntax
void NAPI.Data.SetEntityData(Entity entity, string key, object value);
Required Arguments
- entity: parameter input should be in Entity type.
- key: parameter input should be in string type.
- value: parameter input can be of any type.
Usage example(s)
Example Description
NAPI.Data.SetEntityData(player, "Jailtime", 50);