EntityMetadata Property

RAGE Plugin Hook Documentation

[This is preliminary documentation and is subject to change.]

Gets the metadata associated with this instance.

The value of this property can be used to store data about this instance.
Getting or setting metadata is done using the same syntax as getting or setting a property.
Internally the value is added to a dictionary with the specified property name as key.

Namespace:  Rage
Assembly:  RagePluginHook (in RagePluginHook.dll) Version: (0.56.1131.11510)

public Object Metadata { get; }

Property Value

Type: Object

[Missing <value> documentation for "P:Rage.Entity.Metadata"]

Return Value

Type: Object
An instance of MetadataObject.

This example stores the integer 42 in the metadata of the player's Ped with the key "MyValue".

Ped playerPed = Game.LocalPlayer.Character;
playerPed.Metadata.MyValue = 42;

This example gets the integer stored in the metadata with the key "MyValue" of the player's Ped.

Ped playerPed = Game.LocalPlayer.Character;
int value = playerPed.Metadata.MyValue;

See Also