diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ff8a99de0..885ad9509 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,7 +1,7 @@
-* @fabianterhorst
+* @fabianterhorst @doxoh
/docs/ @lhoerion
!/docs/*.md @lhoerion
!/docs/*.yml @lhoerion
/docs/filterConfig.yml @lhoerion
-/api/AltV.Net.Async.CodeGen/ @zziger
-/api/AltV.Net.Client/ @zziger @juztim
+/api/AltV.Net.Async.CodeGen/ @zziger @doxoh
+/api/AltV.Net.Client/ @zziger @juztim @doxoh
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e7ca8d6dc..b25684ac3 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -264,7 +264,7 @@ jobs:
echo "branch=${build_info%%/*}" >> $GITHUB_OUTPUT
echo "version=${build_info##*/}" >> $GITHUB_OUTPUT
echo "sdk_commit=$(cat ./modules/sdk_version.txt)" >> $GITHUB_OUTPUT
- - run: npm i @altmp/upload-tool@latest
+ - run: npm i @altmp/upload-tool@latest fast-xml-parser@4.3.6
- run: npx alt-upload linux coreclr-module/$BRANCH/x64_linux $VERSION $SDK_VERSION
working-directory: ./modules
env:
diff --git a/api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj b/api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj
index b46b90929..60cb6bb05 100644
--- a/api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj
+++ b/api/AltV.Net.Async.CodeGen/AltV.Net.Async.CodeGen.csproj
@@ -7,8 +7,8 @@
AltMp
AltV .NET Core Async CodeGen
AltMp
- https://github.com/FabianTerhorst/coreclr-module
- https://github.com/FabianTerhorst/coreclr-module
+ https://github.com/altmp/coreclr-module
+ https://github.com/altmp/coreclr-module
git
altv gta bridge
1.0.0
diff --git a/api/AltV.Net.Async/AltAsync.RegisterEvents.cs b/api/AltV.Net.Async/AltAsync.RegisterEvents.cs
index 6dabcf8ce..2161f1cf2 100644
--- a/api/AltV.Net.Async/AltAsync.RegisterEvents.cs
+++ b/api/AltV.Net.Async/AltAsync.RegisterEvents.cs
@@ -25,6 +25,32 @@ public static void RegisterEvents(object target)
ScriptFunction scriptFunction;
switch (scriptEventType)
{
+ case ScriptEventType.BaseObjectCreate:
+ {
+ scriptFunction = ScriptFunction.Create(eventMethodDelegate,
+ new[] { typeof(IBaseObject) }, isAsync: true);
+ if (scriptFunction == null) return;
+ OnBaseObjectCreate += (baseObject) =>
+ {
+ var currScriptFunction = scriptFunction.Clone();
+ currScriptFunction.Set(baseObject);
+ return currScriptFunction.CallAsync();
+ };
+ break;
+ }
+ case ScriptEventType.BaseObjectRemove:
+ {
+ scriptFunction = ScriptFunction.Create(eventMethodDelegate,
+ new[] { typeof(IBaseObject) }, isAsync: true);
+ if (scriptFunction == null) return;
+ OnBaseObjectRemove += (baseObject) =>
+ {
+ var currScriptFunction = scriptFunction.Clone();
+ currScriptFunction.Set(baseObject);
+ return currScriptFunction.CallAsync();
+ };
+ break;
+ }
case ScriptEventType.Checkpoint:
{
scriptFunction = ScriptFunction.Create(eventMethodDelegate,
diff --git a/api/AltV.Net.Async/AltAsync.cs b/api/AltV.Net.Async/AltAsync.cs
index 751e45134..0307aa584 100644
--- a/api/AltV.Net.Async/AltAsync.cs
+++ b/api/AltV.Net.Async/AltAsync.cs
@@ -23,6 +23,18 @@ public static event CheckpointAsyncDelegate OnCheckpoint
remove => Core.CheckpointAsyncEventHandler.Remove(value);
}
+ public static event BaseObjectCreateAsyncDelegate OnBaseObjectCreate
+ {
+ add => Core.BaseObjectCreateAsyncEventHandler.Add(value);
+ remove => Core.BaseObjectCreateAsyncEventHandler.Remove(value);
+ }
+
+ public static event BaseObjectRemoveAsyncDelegate OnBaseObjectRemove
+ {
+ add => Core.BaseObjectRemoveAsyncEventHandler.Add(value);
+ remove => Core.BaseObjectRemoveAsyncEventHandler.Remove(value);
+ }
+
public static event PlayerConnectAsyncDelegate OnPlayerConnect
{
add => Core.PlayerConnectAsyncEventHandler.Add(value);
diff --git a/api/AltV.Net.Async/AltV.Net.Async.csproj b/api/AltV.Net.Async/AltV.Net.Async.csproj
index 6c8ea6c3d..fab578d0f 100644
--- a/api/AltV.Net.Async/AltV.Net.Async.csproj
+++ b/api/AltV.Net.Async/AltV.Net.Async.csproj
@@ -8,8 +8,8 @@
AltMp
AltV .NET Core Async Server Api
AltMp
- https://github.com/FabianTerhorst/coreclr-module
- https://github.com/FabianTerhorst/coreclr-module
+ https://github.com/altmp/coreclr-module
+ https://github.com/altmp/coreclr-module
git
altv gta bridge
1.0.0
diff --git a/api/AltV.Net.Async/AsyncCore.cs b/api/AltV.Net.Async/AsyncCore.cs
index 84305b97c..2dbacf858 100644
--- a/api/AltV.Net.Async/AsyncCore.cs
+++ b/api/AltV.Net.Async/AsyncCore.cs
@@ -81,6 +81,12 @@ internal readonly AsyncEventHandler
internal readonly AsyncEventHandler PlayerDisconnectAsyncEventHandler =
new(EventType.PLAYER_DISCONNECT);
+ internal readonly AsyncEventHandler BaseObjectCreateAsyncEventHandler =
+ new();
+
+ internal readonly AsyncEventHandler BaseObjectRemoveAsyncEventHandler =
+ new();
+
internal readonly AsyncEventHandler PlayerRemoveAsyncEventHandler =
new();
@@ -357,6 +363,27 @@ await PlayerDisconnectAsyncEventHandler.CallAsync(@delegate =>
);
}
+ public override void OnCreateBaseObjectEvent(IBaseObject baseObject)
+ {
+ base.OnCreateBaseObjectEvent(baseObject);
+ if (!BaseObjectCreateAsyncEventHandler.HasEvents()) return;
+ Task.Run(async () =>
+ {
+ await BaseObjectCreateAsyncEventHandler.CallAsync(@delegate =>
+ @delegate(baseObject));
+ });
+ }
+ public override void OnRemoveBaseObjectEvent(IBaseObject baseObject)
+ {
+ base.OnRemoveBaseObjectEvent(baseObject);
+ if (!BaseObjectRemoveAsyncEventHandler.HasEvents()) return;
+ Task.Run(async () =>
+ {
+ await BaseObjectRemoveAsyncEventHandler.CallAsync(@delegate =>
+ @delegate(baseObject));
+ });
+ }
+
public override void OnPlayerRemoveEvent(IPlayer player)
{
base.OnPlayerRemoveEvent(player);
@@ -968,13 +995,13 @@ public override void OnPlayerStopTalkingEvent(IPlayer player)
});
}
- public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, string name, IntPtr[] args, ushort answerId, bool async)
+ public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, string name, object[] objects, ushort answerId, bool async)
{
if (!UnansweredServerRpcRequest.Contains(answerId))
{
UnansweredServerRpcRequest.Add(answerId);
}
- base.OnScriptRPCEvent(eventpointer, target, name, args, answerId, true);
+ base.OnScriptRPCEvent(eventpointer, target, name, objects, answerId, true);
if (UnansweredServerRpcRequest.Contains(answerId))
{
@@ -985,13 +1012,15 @@ public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, strin
}
if (!ScriptRpcAsyncEventHandler.HasEvents()) return;
- Task.Run(async () =>
+
+ var task = Task.Run(async () =>
{
- var mValues = MValueConst.CreateFrom(this, args);
var clientScriptRPCEvent = new AsyncScriptRpcEvent(target, answerId);
- await ScriptRpcAsyncEventHandler.CallAsync(@delegate => @delegate(clientScriptRPCEvent, target, name, mValues.Select(x => x.ToObject()).ToArray(), answerId));
+ await ScriptRpcAsyncEventHandler.CallAsync(@delegate => @delegate(clientScriptRPCEvent, target, name, objects, answerId));
});
+ Task.WaitAll(task);
+
if (UnansweredServerRpcRequest.Contains(answerId))
{
target.EmitRPCAnswer(answerId, null, "Answer not handled");
diff --git a/api/AltV.Net.Async/Elements/Entities/AsyncBaseObject.cs b/api/AltV.Net.Async/Elements/Entities/AsyncBaseObject.cs
index ee7f35725..2e7d20925 100644
--- a/api/AltV.Net.Async/Elements/Entities/AsyncBaseObject.cs
+++ b/api/AltV.Net.Async/Elements/Entities/AsyncBaseObject.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
diff --git a/api/AltV.Net.Async/Events/Events.cs b/api/AltV.Net.Async/Events/Events.cs
index 6314681ac..6aa2a772d 100644
--- a/api/AltV.Net.Async/Events/Events.cs
+++ b/api/AltV.Net.Async/Events/Events.cs
@@ -28,6 +28,8 @@ public delegate Task PlayerHealAsyncDelegate(IPlayer target, ushort oldHealth, u
public delegate Task PlayerDisconnectAsyncDelegate(IPlayer player, string reason);
+ public delegate Task BaseObjectCreateAsyncDelegate(IBaseObject baseObject);
+ public delegate Task BaseObjectRemoveAsyncDelegate(IBaseObject baseObject);
public delegate Task PlayerRemoveAsyncDelegate(IPlayer player);
public delegate Task VehicleRemoveAsyncDelegate(IVehicle vehicle);
diff --git a/api/AltV.Net.CApi.Generator/TypeRegistry.cs b/api/AltV.Net.CApi.Generator/TypeRegistry.cs
index e4f1778f1..97570fdd1 100644
--- a/api/AltV.Net.CApi.Generator/TypeRegistry.cs
+++ b/api/AltV.Net.CApi.Generator/TypeRegistry.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace AltV.Net.CApi.Generator;
diff --git a/api/AltV.Net.CApi/AltV.Net.CApi.csproj b/api/AltV.Net.CApi/AltV.Net.CApi.csproj
index 095f88359..b59a47e5c 100644
--- a/api/AltV.Net.CApi/AltV.Net.CApi.csproj
+++ b/api/AltV.Net.CApi/AltV.Net.CApi.csproj
@@ -1,11 +1,11 @@
- FabianTerhorst
+ FabianTerhorst,Doxoh
AltV .NET CApi
- FabianTerhorst
- https://github.com/FabianTerhorst/coreclr-module
- https://github.com/FabianTerhorst/coreclr-module
+ FabianTerhorst,Doxoh
+ https://github.com/altmp/coreclr-module
+ https://github.com/altmp/coreclr-module
git
altv gta bridge gta5 gtav colshape
1.0.0
diff --git a/api/AltV.Net.CApi/Data/Position.cs b/api/AltV.Net.CApi/Data/Position.cs
index afc7e0bca..13f9ce3d4 100644
--- a/api/AltV.Net.CApi/Data/Position.cs
+++ b/api/AltV.Net.CApi/Data/Position.cs
@@ -1,4 +1,5 @@
using System;
+using System.Drawing;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
@@ -105,6 +106,11 @@ public float Distance(Position b)
return MathF.Sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ);
}
+ public Position ToRadians()
+ {
+ return new Position((X * MathF.PI) / 180, (Y * MathF.PI) / 180, (Z * MathF.PI) / 180);
+ }
+
public static Position operator +(Position a, Position b) => new Position(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
public static Position operator -(Position a, Position b) => new Position(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
diff --git a/api/AltV.Net.CApi/Data/Rotation.cs b/api/AltV.Net.CApi/Data/Rotation.cs
index e8218d1d9..2a26fea9e 100644
--- a/api/AltV.Net.CApi/Data/Rotation.cs
+++ b/api/AltV.Net.CApi/Data/Rotation.cs
@@ -72,6 +72,11 @@ public bool Equals(Rotation other)
return Roll.Equals(other.Roll) && Pitch.Equals(other.Pitch) && Yaw.Equals(other.Yaw);
}
+ public Rotation ToRadians()
+ {
+ return new Rotation((Roll * MathF.PI) / 180, (Pitch * MathF.PI) / 180, (Yaw * MathF.PI) / 180);
+ }
+
public override int GetHashCode() => HashCode.Combine(Roll.GetHashCode(), Pitch.GetHashCode(), Yaw.GetHashCode());
}
}
\ No newline at end of file
diff --git a/api/AltV.Net.CApi/Events/ClientEvents.cs b/api/AltV.Net.CApi/Events/ClientEvents.cs
index 8d634d5df..e4c8822aa 100644
--- a/api/AltV.Net.CApi/Events/ClientEvents.cs
+++ b/api/AltV.Net.CApi/Events/ClientEvents.cs
@@ -17,16 +17,16 @@ namespace AltV.Net.CApi.ClientEvents
public delegate void PlayerSpawnModuleDelegate();
public delegate void PlayerDisconnectModuleDelegate();
- public delegate void PlayerEnterVehicleModuleDelegate(IntPtr pointer, byte seat);
- public delegate void PlayerLeaveVehicleModuleDelegate(IntPtr pointer, byte seat);
- public delegate void PlayerChangeVehicleSeatModuleDelegate(IntPtr pointer, byte oldSeat, byte newSeat);
- public delegate void PlayerChangeAnimationModuleDelegate(IntPtr pointer, uint oldDict, uint newDict, uint oldName, uint newName);
- public delegate void PlayerChangeInteriorModuleDelegate(IntPtr pointer, uint oldIntLoc, uint newIntLoc);
+ public delegate void PlayerEnterVehicleModuleDelegate(IntPtr baseObject, BaseObjectType type, byte seat);
+ public delegate void PlayerLeaveVehicleModuleDelegate(IntPtr baseObject, BaseObjectType type, byte seat);
+ public delegate void PlayerChangeVehicleSeatModuleDelegate(IntPtr pointer, BaseObjectType type, byte oldSeat, byte newSeat);
+ public delegate void PlayerChangeAnimationModuleDelegate(IntPtr pointer, BaseObjectType type, uint oldDict, uint newDict, uint oldName, uint newName);
+ public delegate void PlayerChangeInteriorModuleDelegate(IntPtr pointer, BaseObjectType type, uint oldIntLoc, uint newIntLoc);
public delegate void PlayerWeaponShootModuleDelegate(uint weapon, ushort totalAmmo, ushort ammoInClip);
public delegate void PlayerWeaponChangeModuleDelegate(uint oldWeapon, uint newWeapon);
- public delegate void GameEntityCreateModuleDelegate(IntPtr pointer, byte type);
- public delegate void GameEntityDestroyModuleDelegate(IntPtr pointer, byte type);
+ public delegate void GameEntityCreateModuleDelegate(IntPtr pointer, BaseObjectType type);
+ public delegate void GameEntityDestroyModuleDelegate(IntPtr pointer, BaseObjectType type);
public delegate void AnyResourceErrorModuleDelegate(string name);
public delegate void AnyResourceStartModuleDelegate(string name);
@@ -78,8 +78,8 @@ public delegate void CheckpointModuleDelegate(IntPtr colShapePointer, IntPtr tar
public delegate void EntityHitEntityModuleDelegate(IntPtr targetPointer, BaseObjectType targetType, IntPtr damagerPointer,
BaseObjectType damagerType, uint weaponHash);
- public delegate void PlayerStartEnterVehicleModuleDelegate(IntPtr targetPointer, IntPtr player, byte seat);
- public delegate void PlayerStartLeaveVehicleModuleDelegate(IntPtr targetPointer, IntPtr player, byte seat);
+ public delegate void PlayerStartEnterVehicleModuleDelegate(IntPtr targetPointer, BaseObjectType type, IntPtr player, BaseObjectType playerType, byte seat);
+ public delegate void PlayerStartLeaveVehicleModuleDelegate(IntPtr targetPointer, BaseObjectType type, IntPtr player, BaseObjectType playerType, byte seat);
public delegate void PlayerBulletHitModuleDelegate(uint weapon, IntPtr victimPointer, BaseObjectType victimType,
Position pos);
diff --git a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs
index 87282b950..9a00ddeda 100644
--- a/api/AltV.Net.CApi/Libraries/ClientLibrary.cs
+++ b/api/AltV.Net.CApi/Libraries/ClientLibrary.cs
@@ -902,7 +902,7 @@ public unsafe interface IClientLibrary
public unsafe class ClientLibrary : IClientLibrary
{
- public readonly uint Methods = 1770;
+ public readonly uint Methods = 1773;
public delegate* unmanaged[Cdecl] Audio_AddOutput { get; }
public delegate* unmanaged[Cdecl] Audio_GetBaseObject { get; }
public delegate* unmanaged[Cdecl] Audio_GetCurrentTime { get; }
@@ -3573,7 +3573,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha
public ClientLibrary(Dictionary funcTable)
{
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
- else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 18234026019486245283UL) Outdated = true;
+ else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 78812385462098472UL) Outdated = true;
Audio_AddOutput = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9914412815391408844UL, Audio_AddOutputFallback);
Audio_GetBaseObject = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 6330360502401226894UL, Audio_GetBaseObjectFallback);
Audio_GetCurrentTime = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 2944324482134975819UL, Audio_GetCurrentTimeFallback);
diff --git a/api/AltV.Net.CApi/Libraries/ServerLibrary.cs b/api/AltV.Net.CApi/Libraries/ServerLibrary.cs
index 40111dcaa..80b124f92 100644
--- a/api/AltV.Net.CApi/Libraries/ServerLibrary.cs
+++ b/api/AltV.Net.CApi/Libraries/ServerLibrary.cs
@@ -143,10 +143,13 @@ public unsafe interface IServerLibrary
public delegate* unmanaged[Cdecl] Entity_SetStreamSyncedMetaData { get; }
public delegate* unmanaged[Cdecl] Entity_SetVisible { get; }
public delegate* unmanaged[Cdecl] Event_WeaponDamageEvent_SetDamageValue { get; }
+ public delegate* unmanaged[Cdecl] Metric_Add { get; }
public delegate* unmanaged[Cdecl] Metric_Begin { get; }
public delegate* unmanaged[Cdecl] Metric_End { get; }
+ public delegate* unmanaged[Cdecl] Metric_End2 { get; }
public delegate* unmanaged[Cdecl] Metric_GetName { get; }
public delegate* unmanaged[Cdecl] Metric_GetValue { get; }
+ public delegate* unmanaged[Cdecl] Metric_Inc { get; }
public delegate* unmanaged[Cdecl] Metric_SetValue { get; }
public delegate* unmanaged[Cdecl] Object_ActivatePhysics { get; }
public delegate* unmanaged[Cdecl] Object_PlaceOnGroundProperly { get; }
@@ -485,7 +488,7 @@ public unsafe interface IServerLibrary
public unsafe class ServerLibrary : IServerLibrary
{
- public readonly uint Methods = 1770;
+ public readonly uint Methods = 1773;
public delegate* unmanaged[Cdecl] BaseObject_DeleteSyncedMetaData { get; }
public delegate* unmanaged[Cdecl] BaseObject_SetMultipleSyncedMetaData { get; }
public delegate* unmanaged[Cdecl] BaseObject_SetSyncedMetaData { get; }
@@ -618,10 +621,13 @@ public unsafe class ServerLibrary : IServerLibrary
public delegate* unmanaged[Cdecl] Entity_SetStreamSyncedMetaData { get; }
public delegate* unmanaged[Cdecl] Entity_SetVisible { get; }
public delegate* unmanaged[Cdecl] Event_WeaponDamageEvent_SetDamageValue { get; }
+ public delegate* unmanaged[Cdecl] Metric_Add { get; }
public delegate* unmanaged[Cdecl] Metric_Begin { get; }
public delegate* unmanaged[Cdecl] Metric_End { get; }
+ public delegate* unmanaged[Cdecl] Metric_End2 { get; }
public delegate* unmanaged[Cdecl] Metric_GetName { get; }
public delegate* unmanaged[Cdecl] Metric_GetValue { get; }
+ public delegate* unmanaged[Cdecl] Metric_Inc { get; }
public delegate* unmanaged[Cdecl] Metric_SetValue { get; }
public delegate* unmanaged[Cdecl] Object_ActivatePhysics { get; }
public delegate* unmanaged[Cdecl] Object_PlaceOnGroundProperly { get; }
@@ -1220,14 +1226,20 @@ public unsafe class ServerLibrary : IServerLibrary
private static void Entity_SetVisibleFallback(nint _entity, byte _state) => throw new Exceptions.OutdatedSdkException("Entity_SetVisible", "Entity_SetVisible SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Event_WeaponDamageEvent_SetDamageValueDelegate(nint _event, uint _damageValue);
private static void Event_WeaponDamageEvent_SetDamageValueFallback(nint _event, uint _damageValue) => throw new Exceptions.OutdatedSdkException("Event_WeaponDamageEvent_SetDamageValue", "Event_WeaponDamageEvent_SetDamageValue SDK method is outdated. Please update your module nuget");
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_AddDelegate(nint _metric, ulong _value);
+ private static void Metric_AddFallback(nint _metric, ulong _value) => throw new Exceptions.OutdatedSdkException("Metric_Add", "Metric_Add SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_BeginDelegate(nint _metric);
private static void Metric_BeginFallback(nint _metric) => throw new Exceptions.OutdatedSdkException("Metric_Begin", "Metric_Begin SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_EndDelegate(nint _metric);
private static void Metric_EndFallback(nint _metric) => throw new Exceptions.OutdatedSdkException("Metric_End", "Metric_End SDK method is outdated. Please update your module nuget");
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_End2Delegate(nint _metric);
+ private static void Metric_End2Fallback(nint _metric) => throw new Exceptions.OutdatedSdkException("Metric_End2", "Metric_End2 SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate nint Metric_GetNameDelegate(nint _metric, int* _size);
private static nint Metric_GetNameFallback(nint _metric, int* _size) => throw new Exceptions.OutdatedSdkException("Metric_GetName", "Metric_GetName SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate ulong Metric_GetValueDelegate(nint _metric);
private static ulong Metric_GetValueFallback(nint _metric) => throw new Exceptions.OutdatedSdkException("Metric_GetValue", "Metric_GetValue SDK method is outdated. Please update your module nuget");
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_IncDelegate(nint _metric);
+ private static void Metric_IncFallback(nint _metric) => throw new Exceptions.OutdatedSdkException("Metric_Inc", "Metric_Inc SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Metric_SetValueDelegate(nint _metric, ulong _value);
private static void Metric_SetValueFallback(nint _metric, ulong _value) => throw new Exceptions.OutdatedSdkException("Metric_SetValue", "Metric_SetValue SDK method is outdated. Please update your module nuget");
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Object_ActivatePhysicsDelegate(nint _object);
@@ -1905,7 +1917,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha
public ServerLibrary(Dictionary funcTable)
{
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
- else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 18234026019486245283UL) Outdated = true;
+ else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 78812385462098472UL) Outdated = true;
BaseObject_DeleteSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8228424877092269355UL, BaseObject_DeleteSyncedMetaDataFallback);
BaseObject_SetMultipleSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 1390762125822890831UL, BaseObject_SetMultipleSyncedMetaDataFallback);
BaseObject_SetSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8002999088966424231UL, BaseObject_SetSyncedMetaDataFallback);
@@ -2038,10 +2050,13 @@ public ServerLibrary(Dictionary funcTable)
Entity_SetStreamSyncedMetaData = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 12798418058428333585UL, Entity_SetStreamSyncedMetaDataFallback);
Entity_SetVisible = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8026011842118229214UL, Entity_SetVisibleFallback);
Event_WeaponDamageEvent_SetDamageValue = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 18440396865533386791UL, Event_WeaponDamageEvent_SetDamageValueFallback);
+ Metric_Add = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 16053290375636538610UL, Metric_AddFallback);
Metric_Begin = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 2348810001298180138UL, Metric_BeginFallback);
Metric_End = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 13016512038826983106UL, Metric_EndFallback);
+ Metric_End2 = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 18410039824979474410UL, Metric_End2Fallback);
Metric_GetName = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8652629169459184520UL, Metric_GetNameFallback);
Metric_GetValue = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 16033500183040421617UL, Metric_GetValueFallback);
+ Metric_Inc = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 9564264321313118159UL, Metric_IncFallback);
Metric_SetValue = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 13198892627580896636UL, Metric_SetValueFallback);
Object_ActivatePhysics = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 17585830173881425980UL, Object_ActivatePhysicsFallback);
Object_PlaceOnGroundProperly = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 16593704804065749058UL, Object_PlaceOnGroundProperlyFallback);
diff --git a/api/AltV.Net.CApi/Libraries/SharedLibrary.cs b/api/AltV.Net.CApi/Libraries/SharedLibrary.cs
index 8e8745ae9..549d703b2 100644
--- a/api/AltV.Net.CApi/Libraries/SharedLibrary.cs
+++ b/api/AltV.Net.CApi/Libraries/SharedLibrary.cs
@@ -426,7 +426,7 @@ public unsafe interface ISharedLibrary
public unsafe class SharedLibrary : ISharedLibrary
{
- public readonly uint Methods = 1770;
+ public readonly uint Methods = 1773;
public delegate* unmanaged[Cdecl] Audio_GetID { get; }
public delegate* unmanaged[Cdecl] AudioAttachedOutput_GetID { get; }
public delegate* unmanaged[Cdecl] AudioFilter_GetID { get; }
@@ -1669,7 +1669,7 @@ private IntPtr GetUnmanagedPtr(IDictionary funcTable, ulong ha
public SharedLibrary(Dictionary funcTable)
{
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
- else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 18234026019486245283UL) Outdated = true;
+ else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 78812385462098472UL) Outdated = true;
Audio_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 4464042055475980737UL, Audio_GetIDFallback);
AudioAttachedOutput_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 17725794901805112189UL, AudioAttachedOutput_GetIDFallback);
AudioFilter_GetID = (delegate* unmanaged[Cdecl]) GetUnmanagedPtr(funcTable, 8824535635529306325UL, AudioFilter_GetIDFallback);
diff --git a/api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj b/api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj
index 532d28d7d..6d846bec5 100644
--- a/api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj
+++ b/api/AltV.Net.Client.Async/AltV.Net.Client.Async.csproj
@@ -1,11 +1,11 @@
- FabianTerhorst,zziger,JuzTim
+ FabianTerhorst,Doxoh,zziger,JuzTim
AltV .NET Client Async API
- FabianTerhorst
- https://github.com/FabianTerhorst/coreclr-module
- https://github.com/FabianTerhorst/coreclr-module
+ FabianTerhorst,Doxoh
+ https://github.com/altmp/coreclr-module
+ https://github.com/altmp/coreclr-module
git
altv gta bridge gta5 gtav
1.0.0
@@ -22,7 +22,7 @@
true
AltV.Net.Client.Async
-
+
true
diff --git a/api/AltV.Net.Client/Alt.Events.cs b/api/AltV.Net.Client/Alt.Events.cs
index 9ae23f44e..d0f4417b9 100644
--- a/api/AltV.Net.Client/Alt.Events.cs
+++ b/api/AltV.Net.Client/Alt.Events.cs
@@ -170,6 +170,18 @@ public static event NetOwnerChangeDelegate OnNetOwnerChange
remove => CoreImpl.NetOwnerChangeEventHandler.Remove(value);
}
+ public static event PlayerChangeAnimationDelegate OnPLayerChangeAnimation
+ {
+ add => CoreImpl.PlayerChangeAnimationEventHandler.Add(value);
+ remove => CoreImpl.PlayerChangeAnimationEventHandler.Remove(value);
+ }
+
+ public static event PlayerChangeInteriorDelegate OnPlayerChangeInterior
+ {
+ add => CoreImpl.PlayerChangeInteriorEventHandler.Add(value);
+ remove => CoreImpl.PlayerChangeInteriorEventHandler.Remove(value);
+ }
+
public static event WeaponDamageDelegate OnWeaponDamage
{
add => CoreImpl.WeaponDamageEventHandler.Add(value);
@@ -258,217 +270,224 @@ public static event ScriptRPCDelegate OnScriptRPC
remove => CoreImpl.ScriptRPCHandler.Remove(value);
}
- public static void OnServer(string eventName, Function function) => CoreImpl.AddServerEventListener(eventName, function);
-
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnServer(string eventName, Func function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Function function) => CoreImpl.AddClientEventListener(eventName, function);
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Action function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
- public static void OnClient(string eventName, Func function) => CoreImpl.AddClientEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Function function) => CoreImpl.AddServerEventListener(eventName, function);
+
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action function) => CoreImpl.AddServerEventListener(eventName, Function.Create(Core, function));
+ public static Function OnServer(string eventName, Action