Class AsyncCore
Inheritance
System.Object
AsyncCore
Assembly: AltV.Net.Async.dll
Syntax
public class AsyncCore : Core, ICore, ISharedCore, IInternalCore
Constructors
|
Improve this Doc
View Source
AsyncCore(IntPtr, IntPtr, AssemblyLoadContext, ILibrary, IPoolManager, INativeResourcePool)
Declaration
public AsyncCore(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IPoolManager poolManager, INativeResourcePool nativeResourcePool)
Parameters
Type |
Name |
Description |
System.IntPtr |
nativePointer |
|
System.IntPtr |
resourcePointer |
|
System.Runtime.Loader.AssemblyLoadContext |
assemblyLoadContext |
|
ILibrary |
library |
|
IPoolManager |
poolManager |
|
INativeResourcePool |
nativeResourcePool |
|
Methods
|
Improve this Doc
View Source
GetRegisteredClientEvents()
Declaration
public override IEnumerable<string> GetRegisteredClientEvents()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Overrides
|
Improve this Doc
View Source
GetRegisteredServerEvents()
Declaration
public override IEnumerable<string> GetRegisteredServerEvents()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Overrides
|
Improve this Doc
View Source
IsMainThread()
Declaration
public override bool IsMainThread()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OffClient(String, Function)
Declaration
public void OffClient(string eventName, Function function)
Parameters
Type |
Name |
Description |
System.String |
eventName |
|
Function |
function |
|
|
Improve this Doc
View Source
OffServer(String, Function)
Declaration
public void OffServer(string eventName, Function function)
Parameters
Type |
Name |
Description |
System.String |
eventName |
|
Function |
function |
|
|
Improve this Doc
View Source
OnCheckPointEvent(ICheckpoint, IWorldObject, Boolean)
Declaration
public override void OnCheckPointEvent(ICheckpoint checkpoint, IWorldObject entity, bool state)
Parameters
Overrides
|
Improve this Doc
View Source
OnClient(String, Function)
Declaration
public Function OnClient(string eventName, Function function)
Parameters
Type |
Name |
Description |
System.String |
eventName |
|
Function |
function |
|
Returns
Type |
Description |
Function |
|
|
Improve this Doc
View Source
OnClientDeleteObjectEvent(IntPtr, IPlayer)
Declaration
public override void OnClientDeleteObjectEvent(IntPtr eventPointer, IPlayer sourcePlayer)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
Overrides
|
Improve this Doc
View Source
OnClientEventEvent(IPlayer, String, IntPtr[], MValueConst[], Object[])
Declaration
public override void OnClientEventEvent(IPlayer player, string name, IntPtr[] args, MValueConst[] mValues, object[] objects)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.String |
name |
|
System.IntPtr[] |
args |
|
MValueConst[] |
mValues |
|
System.Object[] |
objects |
|
|
Improve this Doc
View Source
OnClientRequestObjectEvent(IntPtr, IPlayer, UInt32, Position)
Declaration
public override void OnClientRequestObjectEvent(IntPtr eventPointer, IPlayer sourcePlayer, uint model, Position position)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
System.UInt32 |
model |
|
Position |
position |
|
|
Improve this Doc
View Source
OnColShapeEvent(IColShape, IWorldObject, Boolean)
Declaration
public override void OnColShapeEvent(IColShape colShape, IWorldObject entity, bool state)
Parameters
Overrides
|
Improve this Doc
View Source
OnConnectionQueueAddEvent(IConnectionInfo)
Declaration
public override void OnConnectionQueueAddEvent(IConnectionInfo connectionInfo)
Parameters
Overrides
|
Improve this Doc
View Source
OnConnectionQueueRemoveEvent(IConnectionInfo)
Declaration
public override void OnConnectionQueueRemoveEvent(IConnectionInfo connectionInfo)
Parameters
Overrides
|
Improve this Doc
View Source
OnConsoleCommandEvent(String, String[])
Declaration
public override void OnConsoleCommandEvent(string name, string[] args)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String[] |
args |
|
Overrides
|
Improve this Doc
View Source
OnCreateBaseObjectEvent(IBaseObject)
Declaration
public override void OnCreateBaseObjectEvent(IBaseObject baseObject)
Parameters
Overrides
|
Improve this Doc
View Source
OnExplosionEvent(IntPtr, IPlayer, ExplosionType, Position, UInt32, IEntity)
Declaration
public override void OnExplosionEvent(IntPtr eventPointer, IPlayer sourcePlayer, ExplosionType explosionType, Position position, uint explosionFx, IEntity targetEntity)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
ExplosionType |
explosionType |
|
Position |
position |
|
System.UInt32 |
explosionFx |
|
IEntity |
targetEntity |
|
|
Improve this Doc
View Source
OnFireEvent(IntPtr, IPlayer, FireInfo[])
Declaration
public override void OnFireEvent(IntPtr eventPointer, IPlayer player, FireInfo[] fires)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
player |
|
FireInfo[] |
fires |
|
|
Improve this Doc
View Source
OnGivePedScriptedTaskEvent(IntPtr, IPlayer, IPed, UInt32)
Declaration
public override void OnGivePedScriptedTaskEvent(IntPtr eventPointer, IPlayer sourcePlayer, IPed sourcePed, uint taskType)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
IPed |
sourcePed |
|
System.UInt32 |
taskType |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override void OnMetaDataChangeEvent(IEntity entity, string key, object value)
Parameters
Type |
Name |
Description |
IEntity |
entity |
|
System.String |
key |
|
System.Object |
value |
|
Overrides
|
Improve this Doc
View Source
OnNetOwnerChangeEvent(IEntity, IPlayer, IPlayer)
Declaration
public override void OnNetOwnerChangeEvent(IEntity targetEntity, IPlayer oldPlayer, IPlayer newPlayer)
Parameters
Overrides
|
Improve this Doc
View Source
OnPedDamageEvent(IPed, IEntity, UInt32, UInt16, UInt16)
Declaration
public override void OnPedDamageEvent(IPed ped, IEntity attacker, uint weapon, ushort healthDamage, ushort armourDamage)
Parameters
Type |
Name |
Description |
IPed |
ped |
|
IEntity |
attacker |
|
System.UInt32 |
weapon |
|
System.UInt16 |
healthDamage |
|
System.UInt16 |
armourDamage |
|
Overrides
|
Improve this Doc
View Source
OnPedDeathEvent(IPed, IEntity, UInt32)
Declaration
public override void OnPedDeathEvent(IPed ped, IEntity killer, uint weapon)
Parameters
Type |
Name |
Description |
IPed |
ped |
|
IEntity |
killer |
|
System.UInt32 |
weapon |
|
Overrides
|
Improve this Doc
View Source
OnPedHealEvent(IPed, UInt16, UInt16, UInt16, UInt16)
Declaration
public override void OnPedHealEvent(IPed ped, ushort oldHealth, ushort newHealth, ushort oldArmour, ushort newArmour)
Parameters
Type |
Name |
Description |
IPed |
ped |
|
System.UInt16 |
oldHealth |
|
System.UInt16 |
newHealth |
|
System.UInt16 |
oldArmour |
|
System.UInt16 |
newArmour |
|
Overrides
|
Improve this Doc
View Source
OnPedRemoveEvent(IPed)
Declaration
public override void OnPedRemoveEvent(IPed ped)
Parameters
Type |
Name |
Description |
IPed |
ped |
|
Overrides
|
Improve this Doc
View Source
OnPlayerChangeAnimationEvent(IPlayer, UInt32, UInt32, UInt32, UInt32)
Declaration
public override void OnPlayerChangeAnimationEvent(IPlayer player, uint oldDict, uint newDict, uint oldName, uint newName)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.UInt32 |
oldDict |
|
System.UInt32 |
newDict |
|
System.UInt32 |
oldName |
|
System.UInt32 |
newName |
|
Overrides
|
Improve this Doc
View Source
OnPlayerChangeInteriorEvent(IPlayer, UInt32, UInt32)
Declaration
public override void OnPlayerChangeInteriorEvent(IPlayer player, uint oldIntLoc, uint newIntLoc)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.UInt32 |
oldIntLoc |
|
System.UInt32 |
newIntLoc |
|
Overrides
|
Improve this Doc
View Source
OnPlayerChangeVehicleSeatEvent(IVehicle, IPlayer, Byte, Byte)
Declaration
public override void OnPlayerChangeVehicleSeatEvent(IVehicle vehicle, IPlayer player, byte oldSeat, byte newSeat)
Parameters
Type |
Name |
Description |
IVehicle |
vehicle |
|
IPlayer |
player |
|
System.Byte |
oldSeat |
|
System.Byte |
newSeat |
|
Overrides
|
Improve this Doc
View Source
OnPlayerConnectDeniedEvent(PlayerConnectDeniedReason, String, String, UInt64, Boolean, String, UInt16, UInt16, String, Int64)
Declaration
public override void OnPlayerConnectDeniedEvent(PlayerConnectDeniedReason reason, string name, string ip, ulong passwordHash, bool isDebug, string branch, ushort versionMajor, ushort versionMinor, string cdnUrl, long discordId)
Parameters
Type |
Name |
Description |
PlayerConnectDeniedReason |
reason |
|
System.String |
name |
|
System.String |
ip |
|
System.UInt64 |
passwordHash |
|
System.Boolean |
isDebug |
|
System.String |
branch |
|
System.UInt16 |
versionMajor |
|
System.UInt16 |
versionMinor |
|
System.String |
cdnUrl |
|
System.Int64 |
discordId |
|
|
Improve this Doc
View Source
OnPlayerConnectEvent(IPlayer, String)
Declaration
public override void OnPlayerConnectEvent(IPlayer player, string reason)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.String |
reason |
|
Overrides
|
Improve this Doc
View Source
OnPlayerDamageEvent(IPlayer, IEntity, UInt32, UInt16, UInt16)
Declaration
public override void OnPlayerDamageEvent(IPlayer player, IEntity entity, uint weapon, ushort healthDamage, ushort armourDamage)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
IEntity |
entity |
|
System.UInt32 |
weapon |
|
System.UInt16 |
healthDamage |
|
System.UInt16 |
armourDamage |
|
Overrides
|
Improve this Doc
View Source
OnPlayerDeathEvent(IPlayer, IEntity, UInt32)
Declaration
public override void OnPlayerDeathEvent(IPlayer player, IEntity killer, uint weapon)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
IEntity |
killer |
|
System.UInt32 |
weapon |
|
Overrides
|
Improve this Doc
View Source
OnPlayerDimensionChangeEvent(IPlayer, Int32, Int32)
Declaration
public override void OnPlayerDimensionChangeEvent(IPlayer player, int oldDimension, int newDimension)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.Int32 |
oldDimension |
|
System.Int32 |
newDimension |
|
Overrides
|
Improve this Doc
View Source
OnPlayerDisconnectEvent(IPlayer, String)
Declaration
public override void OnPlayerDisconnectEvent(IPlayer player, string reason)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.String |
reason |
|
Overrides
|
Improve this Doc
View Source
OnPlayerEnteringVehicleEvent(IVehicle, IPlayer, Byte)
Declaration
public override void OnPlayerEnteringVehicleEvent(IVehicle vehicle, IPlayer player, byte seat)
Parameters
Overrides
|
Improve this Doc
View Source
OnPlayerEnterVehicleEvent(IVehicle, IPlayer, Byte)
Declaration
public override void OnPlayerEnterVehicleEvent(IVehicle vehicle, IPlayer player, byte seat)
Parameters
Overrides
|
Improve this Doc
View Source
OnPlayerHealEvent(IPlayer, UInt16, UInt16, UInt16, UInt16)
Declaration
public override void OnPlayerHealEvent(IPlayer player, ushort oldHealth, ushort newHealth, ushort oldArmour, ushort newArmour)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
System.UInt16 |
oldHealth |
|
System.UInt16 |
newHealth |
|
System.UInt16 |
oldArmour |
|
System.UInt16 |
newArmour |
|
Overrides
|
Improve this Doc
View Source
OnPlayerLeaveVehicleEvent(IVehicle, IPlayer, Byte)
Declaration
public override void OnPlayerLeaveVehicleEvent(IVehicle vehicle, IPlayer player, byte seat)
Parameters
Overrides
|
Improve this Doc
View Source
OnPlayerRemoveEvent(IPlayer)
Declaration
public override void OnPlayerRemoveEvent(IPlayer player)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
Overrides
|
Improve this Doc
View Source
OnPlayerRequestControlEvent(IntPtr, IEntity, IPlayer)
Declaration
public override void OnPlayerRequestControlEvent(IntPtr eventPtr, IEntity target, IPlayer player)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPtr |
|
IEntity |
target |
|
IPlayer |
player |
|
Overrides
|
Improve this Doc
View Source
OnPlayerSpawnEvent(IPlayer)
Declaration
public override void OnPlayerSpawnEvent(IPlayer player)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
Overrides
|
Improve this Doc
View Source
OnPlayerStartTalkingEvent(IPlayer)
Declaration
public override void OnPlayerStartTalkingEvent(IPlayer player)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
Overrides
|
Improve this Doc
View Source
OnPlayerStopTalkingEvent(IPlayer)
Declaration
public override void OnPlayerStopTalkingEvent(IPlayer player)
Parameters
Type |
Name |
Description |
IPlayer |
player |
|
Overrides
|
Improve this Doc
View Source
OnPlayerWeaponChangeEvent(IntPtr, IPlayer, UInt32, UInt32)
Declaration
public override void OnPlayerWeaponChangeEvent(IntPtr eventPointer, IPlayer player, uint oldWeapon, uint newWeapon)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
player |
|
System.UInt32 |
oldWeapon |
|
System.UInt32 |
newWeapon |
|
Overrides
|
Improve this Doc
View Source
OnRemoveBaseObjectEvent(IBaseObject)
Declaration
public override void OnRemoveBaseObjectEvent(IBaseObject baseObject)
Parameters
Overrides
|
Improve this Doc
View Source
OnRequestSyncedSceneEvent(IntPtr, IPlayer, Int32)
Declaration
public override void OnRequestSyncedSceneEvent(IntPtr eventPointer, IPlayer sourcePlayer, int sceneid)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
System.Int32 |
sceneid |
|
Overrides
|
Improve this Doc
View Source
OnResourceErrorEvent(INativeResource)
Declaration
public override void OnResourceErrorEvent(INativeResource resource)
Parameters
Overrides
|
Improve this Doc
View Source
OnResourceStartEvent(INativeResource)
Declaration
public override void OnResourceStartEvent(INativeResource resource)
Parameters
Overrides
|
Improve this Doc
View Source
OnResourceStopEvent(INativeResource)
Declaration
public override void OnResourceStopEvent(INativeResource resource)
Parameters
Overrides
|
Improve this Doc
View Source
OnScriptAnswerRPCEvent(IPlayer, UInt16, IntPtr, String)
Declaration
public override void OnScriptAnswerRPCEvent(IPlayer target, ushort answerid, IntPtr mValue, string answererror)
Parameters
Type |
Name |
Description |
IPlayer |
target |
|
System.UInt16 |
answerid |
|
System.IntPtr |
mValue |
|
System.String |
answererror |
|
Overrides
|
Improve this Doc
View Source
OnScriptLoaded(IScript)
Declaration
public override void OnScriptLoaded(IScript script)
Parameters
Type |
Name |
Description |
IScript |
script |
|
|
Improve this Doc
View Source
OnScriptRPCEvent(IntPtr, IPlayer, String, Object[], UInt16, Boolean)
Declaration
public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, string name, object[] objects, ushort answerId, bool async)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventpointer |
|
IPlayer |
target |
|
System.String |
name |
|
System.Object[] |
objects |
|
System.UInt16 |
answerId |
|
System.Boolean |
async |
|
Overrides
|
Improve this Doc
View Source
OnServer(String, Function)
Declaration
public Function OnServer(string eventName, Function function)
Parameters
Type |
Name |
Description |
System.String |
eventName |
|
Function |
function |
|
Returns
Type |
Description |
Function |
|
|
Improve this Doc
View Source
OnServerEventEvent(String, IntPtr[], MValueConst[], Object[])
Declaration
public override void OnServerEventEvent(string name, IntPtr[] args, MValueConst[] mValues, object[] objects)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.IntPtr[] |
args |
|
MValueConst[] |
mValues |
|
System.Object[] |
objects |
|
|
Improve this Doc
View Source
OnServerStartedEvent()
Declaration
public override void OnServerStartedEvent()
Overrides
|
Improve this Doc
View Source
OnStartProjectileEvent(IntPtr, IPlayer, Position, Position, UInt32, UInt32)
Declaration
public override void OnStartProjectileEvent(IntPtr eventPointer, IPlayer player, Position startPosition, Position direction, uint ammoHash, uint weaponHash)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
player |
|
Position |
startPosition |
|
Position |
direction |
|
System.UInt32 |
ammoHash |
|
System.UInt32 |
weaponHash |
|
|
Improve this Doc
View Source
OnStartSyncedSceneEvent(IPlayer, Int32, Position, Rotation, UInt32, Dictionary<IEntity, UInt32>)
Declaration
public override void OnStartSyncedSceneEvent(IPlayer sourcePlayer, int sceneid, Position position, Rotation rotation, uint animDictHash, Dictionary<IEntity, uint> entityAndAnimHash)
Parameters
Type |
Name |
Description |
IPlayer |
sourcePlayer |
|
System.Int32 |
sceneid |
|
Position |
position |
|
Rotation |
rotation |
|
System.UInt32 |
animDictHash |
|
System.Collections.Generic.Dictionary<IEntity, System.UInt32> |
entityAndAnimHash |
|
|
Improve this Doc
View Source
OnStopSyncedSceneEvent(IPlayer, Int32)
Declaration
public override void OnStopSyncedSceneEvent(IPlayer sourcePlayer, int sceneid)
Parameters
Type |
Name |
Description |
IPlayer |
sourcePlayer |
|
System.Int32 |
sceneid |
|
Overrides
|
Improve this Doc
View Source
Declaration
public override void OnSyncedMetaDataChangeEvent(IEntity entity, string key, object value)
Parameters
Type |
Name |
Description |
IEntity |
entity |
|
System.String |
key |
|
System.Object |
value |
|
Overrides
|
Improve this Doc
View Source
OnUpdateSyncedSceneEvent(IPlayer, Single, Int32)
Declaration
public override void OnUpdateSyncedSceneEvent(IPlayer sourcePlayer, float startRate, int sceneid)
Parameters
Type |
Name |
Description |
IPlayer |
sourcePlayer |
|
System.Single |
startRate |
|
System.Int32 |
sceneid |
|
Overrides
|
Improve this Doc
View Source
OnVehicleAttachEvent(IVehicle, IVehicle)
Declaration
public override void OnVehicleAttachEvent(IVehicle targetVehicle, IVehicle attachedVehicle)
Parameters
Overrides
|
Improve this Doc
View Source
OnVehicleDamageEvent(IVehicle, IEntity, UInt32, UInt32, UInt32, UInt32, UInt32)
Declaration
public override void OnVehicleDamageEvent(IVehicle targetVehicle, IEntity sourceEntity, uint bodyHealthDamage, uint additionalBodyHealthDamage, uint engineHealthDamage, uint petrolTankDamage, uint weaponHash)
Parameters
Type |
Name |
Description |
IVehicle |
targetVehicle |
|
IEntity |
sourceEntity |
|
System.UInt32 |
bodyHealthDamage |
|
System.UInt32 |
additionalBodyHealthDamage |
|
System.UInt32 |
engineHealthDamage |
|
System.UInt32 |
petrolTankDamage |
|
System.UInt32 |
weaponHash |
|
Overrides
|
Improve this Doc
View Source
OnVehicleDestroyEvent(IVehicle)
Declaration
public override void OnVehicleDestroyEvent(IVehicle vehicle)
Parameters
Overrides
|
Improve this Doc
View Source
OnVehicleDetachEvent(IVehicle, IVehicle)
Declaration
public override void OnVehicleDetachEvent(IVehicle targetVehicle, IVehicle detachedVehicle)
Parameters
Overrides
|
Improve this Doc
View Source
OnVehicleHornEvent(IntPtr, IVehicle, IPlayer, Boolean)
Declaration
public override void OnVehicleHornEvent(IntPtr eventPointer, IVehicle targetVehicle, IPlayer reporterPlayer, bool state)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IVehicle |
targetVehicle |
|
IPlayer |
reporterPlayer |
|
System.Boolean |
state |
|
Overrides
|
Improve this Doc
View Source
OnVehicleRemoveEvent(IVehicle)
Declaration
public override void OnVehicleRemoveEvent(IVehicle vehicle)
Parameters
Overrides
|
Improve this Doc
View Source
OnVehicleSirenEvent(IVehicle, Boolean)
Declaration
public override void OnVehicleSirenEvent(IVehicle targetVehicle, bool state)
Parameters
Type |
Name |
Description |
IVehicle |
targetVehicle |
|
System.Boolean |
state |
|
Overrides
|
Improve this Doc
View Source
OnWeaponDamageEvent(IntPtr, IPlayer, IEntity, UInt32, UInt16, Position, BodyPart)
Declaration
public override void OnWeaponDamageEvent(IntPtr eventPointer, IPlayer sourcePlayer, IEntity targetEntity, uint weapon, ushort damage, Position shotOffset, BodyPart bodyPart)
Parameters
Type |
Name |
Description |
System.IntPtr |
eventPointer |
|
IPlayer |
sourcePlayer |
|
IEntity |
targetEntity |
|
System.UInt32 |
weapon |
|
System.UInt16 |
damage |
|
Position |
shotOffset |
|
BodyPart |
bodyPart |
|
Implements