Interface ISharedBaseObject
Namespace: AltV.Net.Shared.Elements.Entities
Assembly: AltV.Net.Shared.dll
Syntax
public interface ISharedBaseObject : INative
Properties
| Improve this Doc View SourceBaseObjectNativePointer
Declaration
IntPtr BaseObjectNativePointer { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Cached
Declaration
bool Cached { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Core
Declaration
ISharedCore Core { get; }
Property Value
Type | Description |
---|---|
ISharedCore |
Id
Declaration
uint Id { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Type
Declaration
BaseObjectType Type { get; }
Property Value
Type | Description |
---|---|
BaseObjectType |
Methods
| Improve this Doc View SourceCheckIfEntityExists()
Declaration
void CheckIfEntityExists()
CheckIfEntityExistsOrCached()
Declaration
void CheckIfEntityExistsOrCached()
ClearData()
Deletes all set data from the entity.
Declaration
void ClearData()
Remarks
Data is accessible only within the resource that set the data.
DeleteData(String)
Deletes a value by a given key from the entity.
Declaration
void DeleteData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Remarks
Data is accessible only within the resource that set the data.
DeleteMetaData(String)
Deletes a meta data key from an entity.
Declaration
void DeleteMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Remarks
Meta data is accessible across different serverside resources.
Destroy()
Destroy the baseobject
Declaration
void Destroy()
GetAllDataKeys()
Returns all stored data keys retrievable with GetData<T>(String, out T)
Declaration
IEnumerable<string> GetAllDataKeys()
Returns
Type | Description |
---|---|
IEnumerable<System.String> | IEnumerable |
GetData<T>(String, out T)
Returns data for a given key.
Declaration
bool GetData<T>(string key, out T result)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
T | result |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Data is accessible only within the resource that set the data.
GetMetaData(String, out MValueConst)
Returns meta data for a given key.
Declaration
void GetMetaData(string key, out MValueConst result)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
MValueConst | result |
Remarks
Meta data is accessible across different serverside resources.
GetMetaData<T>(String, out T)
Returns meta data for a given key.
Declaration
bool GetMetaData<T>(string key, out T result)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
T | result |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Meta data is accessible across different serverside resources.
GetSyncedMetaData(String, out MValueConst)
Gets the synced meta data of an entity.
Declaration
void GetSyncedMetaData(string key, out MValueConst value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
MValueConst | value |
Remarks
Synced meta data is accessible across different serverside resources and across all clients.
GetSyncedMetaData<T>(String, out T)
Get synced meta data of the entity.
Declaration
bool GetSyncedMetaData<T>(string key, out T result)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
T | result |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
Remarks
Synced meta data is accessible across different serverside resources and across all clients.
Exceptions
Type | Condition |
---|---|
EntityRemovedException | This entity was removed |
HasData(String)
Checks if the entity has a value for the given key.
Declaration
bool HasData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Data is accessible only within the resource that set the data.
HasMetaData(String)
Checks if the entity has a given meta data key.
Declaration
bool HasMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Meta data is accessible across different serverside resources.
HasSyncedMetaData(String)
Checks if a synced meta data key is set on an entity.
Declaration
bool HasSyncedMetaData(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Synced meta data is accessible across different serverside resources and across all clients.
OnDestroy()
Declaration
void OnDestroy()
SetData(String, Object)
Sets a value with a given on an entity.
Declaration
void SetData(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Object | value |
Remarks
Data is accessible only within the resource that set the data.
SetMetaData(Dictionary<String, Object>)
Declaration
void SetMetaData(Dictionary<string, object> metaData)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | metaData |
SetMetaData(String, in MValueConst)
Sets the given object into the meta data with the given key.
Declaration
void SetMetaData(string key, in MValueConst value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
MValueConst | value |
Remarks
Meta data is accessible across different serverside resources.
Exceptions
Type | Condition |
---|---|
EntityRemovedException | This entity was deleted before |
SetMetaData(String, Object)
Sets the given object into the meta data with the given key.
Declaration
void SetMetaData(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
System.Object | value |
Remarks
Meta data is accessible across different serverside resources.
Exceptions
Type | Condition |
---|---|
EntityRemovedException | This entity was deleted before |