SetEntitySyncedData

From RAGE Multiplayer Wiki
Revision as of 01:34, 27 November 2019 by Muphy (talk | contribs) (Created page with "Sets the given data value for the given entity and synchronizes this value to clients. Use SetEntityData if the data should only exist on the server and shouldn't be synch...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Sets the given data value for the given entity and synchronizes this value to clients. Use SetEntityData if the data should only exist on the server and shouldn't be synchronized. Check the Synchronized Types for which types you can synchronize with this..

Syntax

void NAPI.Data.SetEntitySharedData(NetHandle entity, string key, object value);
void NAPI.Data.SetEntitySharedData(NetHandle entity, Dictionary<string, object> valueforstring );

Required Arguments

  • entity: parameter input should be in NetHandle type.

1. overload:

  • key: parameter input should be in string type.
  • value: parameter input should be in any type.

2. overload:

  • valueforstring: like 1. overload, but for multiple keys at one time. Parameter input should be in Dictionary<string, object> type.

Usage example(s)

Example Description

NAPI.Data.SetEntitySharedData(entity, key, value);