Skip to content

Commit ac4fbbf

Browse files
committed
feat(server): Add VehicleBadge setter
1 parent 78e2840 commit ac4fbbf

File tree

10 files changed

+110
-23
lines changed

10 files changed

+110
-23
lines changed

api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Diagnostics.CodeAnalysis;
44
using System.Numerics;
5+
using AltV.Net.CApi.Data;
56
using AltV.Net.Data;
67
using AltV.Net.Elements.Entities;
78
using AltV.Net.Enums;
@@ -1993,6 +1994,24 @@ public List<PlayerSeat> Passengers
19931994
}
19941995
}
19951996

1997+
public void SetBage(string textureDictionary, string texture, VehicleBadgePosition[] vehicleBadgePosition)
1998+
{
1999+
lock (Vehicle)
2000+
{
2001+
if (!AsyncContext.CheckIfExistsOrCachedNullable(Vehicle)) return;
2002+
Vehicle.SetBage(textureDictionary, texture, vehicleBadgePosition);
2003+
}
2004+
}
2005+
2006+
public void SetBage(uint textureDictionary, uint texture, VehicleBadgePosition[] vehicleBadgePosition)
2007+
{
2008+
lock (Vehicle)
2009+
{
2010+
if (!AsyncContext.CheckIfExistsOrCachedNullable(Vehicle)) return;
2011+
Vehicle.SetBage(textureDictionary, texture, vehicleBadgePosition);
2012+
}
2013+
}
2014+
19962015
[Obsolete("Use new async API instead")]
19972016
public IVehicle ToAsync(IAsyncContext asyncContext)
19982017
{

api/AltV.Net.CApi.Generator/Program.cs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ private static string GetCMethodDelegateType(CMethod method)
1515
var args = string.Join("", method.Params.Select(p => p.Type + ", "));
1616
return $"delegate* unmanaged[Cdecl{noGc}]<{args}{method.ReturnType}>";
1717
}
18-
18+
1919
private static string GetCMethodArgs(CMethod method)
2020
{
2121
return string.Join(", ", method.Params.Select(p => p.Type + " " + p.Name));
2222
}
2323

2424
public static void Generate()
2525
{
26-
var libOutputPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "../../../../AltV.Net.CApi/Libraries");
26+
var libOutputPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "../../../../AltV.Net.CApi/Libraries");
2727
var tableOutputPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "../../../../../runtime/c-api/func_table.cpp");
2828

2929
var tableHashes = new StringBuilder();
@@ -40,31 +40,32 @@ public static void Generate()
4040
collisionFound = true;
4141
Console.WriteLine("Colliding methods: " + string.Join(",", collision.Select(e => e.Name)));
4242
}
43-
43+
4444
if (collisionFound) throw new Exception("Collision found!");
4545

4646
var capiHash = FnvHash.Generate(string.Join(";", parsedMethods.Select(e => e.Hash)));
47-
47+
4848
foreach (var group in parsedMethods.OrderBy(e => e.Name).GroupBy(e => e.Target))
4949
{
5050
#region C# bindings
5151
var target = group.Key.ForceCapitalize();
52-
52+
5353
var methods = string.Join("\n", group.Where(e => !e.OnlyManual)
5454
.Select(e => $" public {GetCMethodDelegateType(e)} {e.Name} {{ get; }}"));
55-
55+
5656
// todo add docs link to the exception
5757
var fallbacks = string.Join("\n", group.Where(e => !e.OnlyManual)
5858
.Select(e => $" [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate {e.ReturnType} {e.Name}Delegate({GetCMethodArgs(e)});\n"
5959
+ $" private static {e.ReturnType} {e.Name}Fallback({GetCMethodArgs(e)}) => throw new Exceptions.OutdatedSdkException(\"{e.Name}\", \"{e.Name} SDK method is outdated. Please update your module nuget\");"));
60-
60+
6161
var loads = string.Join("\n", group.Where(e => !e.OnlyManual)
6262
.Select(e => $" {e.Name} = ({GetCMethodDelegateType(e)}) GetUnmanagedPtr<{e.Name}Delegate>(funcTable, {e.Hash}UL, {e.Name}Fallback);"));
63-
63+
6464
var output = new StringBuilder();
6565

6666
output.Append("// ReSharper disable InconsistentNaming\n");
6767
output.Append("using AltV.Net.Data;\n");
68+
output.Append("using AltV.Net.CApi.Data;\n");
6869
output.Append("using System.Numerics;\n");
6970
output.Append("using System.Runtime.InteropServices;\n");
7071
output.Append("using AltV.Net.Elements.Args;\n");
@@ -100,21 +101,21 @@ public static void Generate()
100101

101102
File.WriteAllText(Path.Combine(libOutputPath, $"{target}Library.cs"), output.ToString());
102103
#endregion
103-
104+
104105
#region Func table
105106

106107
if (group.Key != "SHARED")
107108
{
108109
tableHashes.Append($" #ifdef ALT_{group.Key}_API\n");
109110
tablePointers.Append($" #ifdef ALT_{group.Key}_API\n");
110111
}
111-
112+
112113
foreach (var e in group)
113114
{
114115
tableHashes.Append($" {e.Hash}UL,\n");
115116
tablePointers.Append($" (void*) {e.Name},\n");
116117
}
117-
118+
118119
if (group.Key != "SHARED")
119120
{
120121
tableHashes.Append($" #endif\n");
@@ -125,13 +126,13 @@ public static void Generate()
125126

126127
var table = new StringBuilder();
127128
table.Append("#include \"func_table.h\"\n\n");
128-
129+
129130
table.Append($"inline uint64_t capiHash = {capiHash}UL;\n");
130131
table.Append("inline uint64_t capiHashes[] = {\n");
131132
table.Append(" 0,\n");
132133
table.Append(tableHashes);
133134
table.Append("};\n\n");
134-
135+
135136
table.Append("inline void* capiPointers[] = {\n");
136137
table.Append(" (void*) &capiHash,\n");
137138
table.Append(tablePointers);
@@ -145,10 +146,10 @@ public static void Generate()
145146
table.Append(" };\n");
146147
table.Append(" return &data;\n");
147148
table.Append("}");
148-
149+
149150
File.WriteAllText(tableOutputPath, table.ToString());
150-
}
151-
151+
}
152+
152153
public static void Main()
153154
{
154155
Generate();

api/AltV.Net.CApi.Generator/TypeRegistry.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ public static class TypeRegistry
123123
{ "rotation_t", "Rotation" },
124124
{ "alt::Rotation", "Rotation" },
125125

126+
{ "vehicleBadgePosition_t[]", "VehicleBadgePosition[]" },
127+
126128
{ "cloth_t&", "Cloth*" },
127129
{ "cloth_t", "Cloth" },
128130
{ "dlccloth_t&", "DlcCloth*" },
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System.Numerics;
2+
using System.Runtime.InteropServices;
3+
4+
namespace AltV.Net.CApi.Data;
5+
6+
[StructLayout(LayoutKind.Sequential)]
7+
public struct VehicleBadgePosition : IEquatable<VehicleBadgePosition>
8+
{
9+
public VehicleBadgePosition(bool active, byte alpha, float size, short boneIndex, Vector3 offset, Vector3 direction, Vector3 side)
10+
{
11+
Active = active ? (byte)1 : (byte)0;
12+
Alpha = alpha;
13+
Size = size;
14+
BoneIndex = boneIndex;
15+
Offset = offset;
16+
Direction = direction;
17+
Side = side;
18+
}
19+
20+
public byte Active { get; set; } = 0;
21+
public byte Alpha { get; set; } = 255;
22+
public float Size { get; set; } = 1f;
23+
public short BoneIndex { get; set; } = 0;
24+
public Vector3 Offset { get; set; } = new(0, 0, 0);
25+
public Vector3 Direction { get; set; } = new(0, 0, 0);
26+
public Vector3 Side { get; set; } = new(0, 0, 0);
27+
28+
public bool Equals(VehicleBadgePosition other)
29+
{
30+
return Active == other.Active && Alpha == other.Alpha && Size.Equals(other.Size) && BoneIndex == other.BoneIndex && Offset.Equals(other.Offset) && Direction.Equals(other.Direction) && Side.Equals(other.Side);
31+
}
32+
33+
public override bool Equals(object? obj)
34+
{
35+
return obj is VehicleBadgePosition other && Equals(other);
36+
}
37+
38+
public override int GetHashCode() => HashCode.Combine(Active.GetHashCode(), Alpha.GetHashCode(), Size.GetHashCode(), BoneIndex.GetHashCode(), Offset.GetHashCode(), Direction.GetHashCode(), Side.GetHashCode());
39+
}

api/AltV.Net.CApi/Libraries/ClientLibrary.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ReSharper disable InconsistentNaming
22
using AltV.Net.Data;
3+
using AltV.Net.CApi.Data;
34
using System.Numerics;
45
using System.Runtime.InteropServices;
56
using AltV.Net.Elements.Args;
@@ -889,7 +890,7 @@ public unsafe interface IClientLibrary
889890

890891
public unsafe class ClientLibrary : IClientLibrary
891892
{
892-
public readonly uint Methods = 1755;
893+
public readonly uint Methods = 1756;
893894
public delegate* unmanaged[Cdecl]<nint, nint, void> Audio_AddOutput { get; }
894895
public delegate* unmanaged[Cdecl]<nint, nint> Audio_GetBaseObject { get; }
895896
public delegate* unmanaged[Cdecl]<nint, double> Audio_GetCurrentTime { get; }
@@ -3524,7 +3525,7 @@ private IntPtr GetUnmanagedPtr<T>(IDictionary<ulong, IntPtr> funcTable, ulong ha
35243525
public ClientLibrary(Dictionary<ulong, IntPtr> funcTable)
35253526
{
35263527
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
3527-
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 554522947139118248UL) Outdated = true;
3528+
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 9602013249028565151UL) Outdated = true;
35283529
Audio_AddOutput = (delegate* unmanaged[Cdecl]<nint, nint, void>) GetUnmanagedPtr<Audio_AddOutputDelegate>(funcTable, 9914412815391408844UL, Audio_AddOutputFallback);
35293530
Audio_GetBaseObject = (delegate* unmanaged[Cdecl]<nint, nint>) GetUnmanagedPtr<Audio_GetBaseObjectDelegate>(funcTable, 6330360502401226894UL, Audio_GetBaseObjectFallback);
35303531
Audio_GetCurrentTime = (delegate* unmanaged[Cdecl]<nint, double>) GetUnmanagedPtr<Audio_GetCurrentTimeDelegate>(funcTable, 2944324482134975819UL, Audio_GetCurrentTimeFallback);

api/AltV.Net.CApi/Libraries/ServerLibrary.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ReSharper disable InconsistentNaming
22
using AltV.Net.Data;
3+
using AltV.Net.CApi.Data;
34
using System.Numerics;
45
using System.Runtime.InteropServices;
56
using AltV.Net.Elements.Args;
@@ -381,6 +382,7 @@ public unsafe interface IServerLibrary
381382
public delegate* unmanaged[Cdecl]<nint, void> Vehicle_Repair { get; }
382383
public delegate* unmanaged[Cdecl]<nint, byte, float, void> Vehicle_SetArmoredWindowHealth { get; }
383384
public delegate* unmanaged[Cdecl]<nint, byte, byte, void> Vehicle_SetArmoredWindowShootCount { get; }
385+
public delegate* unmanaged[Cdecl]<nint, uint, uint, VehicleBadgePosition[], ushort, void> Vehicle_SetBadge { get; }
384386
public delegate* unmanaged[Cdecl]<nint, byte, void> Vehicle_SetBoatAnchor { get; }
385387
public delegate* unmanaged[Cdecl]<nint, uint, void> Vehicle_SetBodyAdditionalHealth { get; }
386388
public delegate* unmanaged[Cdecl]<nint, uint, void> Vehicle_SetBodyHealth { get; }
@@ -482,7 +484,7 @@ public unsafe interface IServerLibrary
482484

483485
public unsafe class ServerLibrary : IServerLibrary
484486
{
485-
public readonly uint Methods = 1755;
487+
public readonly uint Methods = 1756;
486488
public delegate* unmanaged[Cdecl]<nint, nint, void> BaseObject_DeleteSyncedMetaData { get; }
487489
public delegate* unmanaged[Cdecl]<nint, nint[], nint[], ulong, void> BaseObject_SetMultipleSyncedMetaData { get; }
488490
public delegate* unmanaged[Cdecl]<nint, nint, nint, void> BaseObject_SetSyncedMetaData { get; }
@@ -854,6 +856,7 @@ public unsafe class ServerLibrary : IServerLibrary
854856
public delegate* unmanaged[Cdecl]<nint, void> Vehicle_Repair { get; }
855857
public delegate* unmanaged[Cdecl]<nint, byte, float, void> Vehicle_SetArmoredWindowHealth { get; }
856858
public delegate* unmanaged[Cdecl]<nint, byte, byte, void> Vehicle_SetArmoredWindowShootCount { get; }
859+
public delegate* unmanaged[Cdecl]<nint, uint, uint, VehicleBadgePosition[], ushort, void> Vehicle_SetBadge { get; }
857860
public delegate* unmanaged[Cdecl]<nint, byte, void> Vehicle_SetBoatAnchor { get; }
858861
public delegate* unmanaged[Cdecl]<nint, uint, void> Vehicle_SetBodyAdditionalHealth { get; }
859862
public delegate* unmanaged[Cdecl]<nint, uint, void> Vehicle_SetBodyHealth { get; }
@@ -1693,6 +1696,8 @@ public unsafe class ServerLibrary : IServerLibrary
16931696
private static void Vehicle_SetArmoredWindowHealthFallback(nint _vehicle, byte _windowId, float _health) => throw new Exceptions.OutdatedSdkException("Vehicle_SetArmoredWindowHealth", "Vehicle_SetArmoredWindowHealth SDK method is outdated. Please update your module nuget");
16941697
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Vehicle_SetArmoredWindowShootCountDelegate(nint _vehicle, byte _windowId, byte _count);
16951698
private static void Vehicle_SetArmoredWindowShootCountFallback(nint _vehicle, byte _windowId, byte _count) => throw new Exceptions.OutdatedSdkException("Vehicle_SetArmoredWindowShootCount", "Vehicle_SetArmoredWindowShootCount SDK method is outdated. Please update your module nuget");
1699+
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Vehicle_SetBadgeDelegate(nint _vehicle, uint _textureDictionary, uint _texture, VehicleBadgePosition[] vehicleBadgePosition, ushort _size);
1700+
private static void Vehicle_SetBadgeFallback(nint _vehicle, uint _textureDictionary, uint _texture, VehicleBadgePosition[] vehicleBadgePosition, ushort _size) => throw new Exceptions.OutdatedSdkException("Vehicle_SetBadge", "Vehicle_SetBadge SDK method is outdated. Please update your module nuget");
16961701
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Vehicle_SetBoatAnchorDelegate(nint _vehicle, byte _state);
16971702
private static void Vehicle_SetBoatAnchorFallback(nint _vehicle, byte _state) => throw new Exceptions.OutdatedSdkException("Vehicle_SetBoatAnchor", "Vehicle_SetBoatAnchor SDK method is outdated. Please update your module nuget");
16981703
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void Vehicle_SetBodyAdditionalHealthDelegate(nint _vehicle, uint _health);
@@ -1896,7 +1901,7 @@ private IntPtr GetUnmanagedPtr<T>(IDictionary<ulong, IntPtr> funcTable, ulong ha
18961901
public ServerLibrary(Dictionary<ulong, IntPtr> funcTable)
18971902
{
18981903
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
1899-
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 554522947139118248UL) Outdated = true;
1904+
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 9602013249028565151UL) Outdated = true;
19001905
BaseObject_DeleteSyncedMetaData = (delegate* unmanaged[Cdecl]<nint, nint, void>) GetUnmanagedPtr<BaseObject_DeleteSyncedMetaDataDelegate>(funcTable, 8228424877092269355UL, BaseObject_DeleteSyncedMetaDataFallback);
19011906
BaseObject_SetMultipleSyncedMetaData = (delegate* unmanaged[Cdecl]<nint, nint[], nint[], ulong, void>) GetUnmanagedPtr<BaseObject_SetMultipleSyncedMetaDataDelegate>(funcTable, 1390762125822890831UL, BaseObject_SetMultipleSyncedMetaDataFallback);
19021907
BaseObject_SetSyncedMetaData = (delegate* unmanaged[Cdecl]<nint, nint, nint, void>) GetUnmanagedPtr<BaseObject_SetSyncedMetaDataDelegate>(funcTable, 8002999088966424231UL, BaseObject_SetSyncedMetaDataFallback);
@@ -2268,6 +2273,7 @@ public ServerLibrary(Dictionary<ulong, IntPtr> funcTable)
22682273
Vehicle_Repair = (delegate* unmanaged[Cdecl]<nint, void>) GetUnmanagedPtr<Vehicle_RepairDelegate>(funcTable, 277481303661922113UL, Vehicle_RepairFallback);
22692274
Vehicle_SetArmoredWindowHealth = (delegate* unmanaged[Cdecl]<nint, byte, float, void>) GetUnmanagedPtr<Vehicle_SetArmoredWindowHealthDelegate>(funcTable, 1070345202824576095UL, Vehicle_SetArmoredWindowHealthFallback);
22702275
Vehicle_SetArmoredWindowShootCount = (delegate* unmanaged[Cdecl]<nint, byte, byte, void>) GetUnmanagedPtr<Vehicle_SetArmoredWindowShootCountDelegate>(funcTable, 4149223353503655708UL, Vehicle_SetArmoredWindowShootCountFallback);
2276+
Vehicle_SetBadge = (delegate* unmanaged[Cdecl]<nint, uint, uint, VehicleBadgePosition[], ushort, void>) GetUnmanagedPtr<Vehicle_SetBadgeDelegate>(funcTable, 15010482901293452804UL, Vehicle_SetBadgeFallback);
22712277
Vehicle_SetBoatAnchor = (delegate* unmanaged[Cdecl]<nint, byte, void>) GetUnmanagedPtr<Vehicle_SetBoatAnchorDelegate>(funcTable, 16890059088943800731UL, Vehicle_SetBoatAnchorFallback);
22722278
Vehicle_SetBodyAdditionalHealth = (delegate* unmanaged[Cdecl]<nint, uint, void>) GetUnmanagedPtr<Vehicle_SetBodyAdditionalHealthDelegate>(funcTable, 5545167983491514394UL, Vehicle_SetBodyAdditionalHealthFallback);
22732279
Vehicle_SetBodyHealth = (delegate* unmanaged[Cdecl]<nint, uint, void>) GetUnmanagedPtr<Vehicle_SetBodyHealthDelegate>(funcTable, 13734895793996634557UL, Vehicle_SetBodyHealthFallback);

api/AltV.Net.CApi/Libraries/SharedLibrary.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ReSharper disable InconsistentNaming
22
using AltV.Net.Data;
3+
using AltV.Net.CApi.Data;
34
using System.Numerics;
45
using System.Runtime.InteropServices;
56
using AltV.Net.Elements.Args;
@@ -424,7 +425,7 @@ public unsafe interface ISharedLibrary
424425

425426
public unsafe class SharedLibrary : ISharedLibrary
426427
{
427-
public readonly uint Methods = 1755;
428+
public readonly uint Methods = 1756;
428429
public delegate* unmanaged[Cdecl]<nint, uint> Audio_GetID { get; }
429430
public delegate* unmanaged[Cdecl]<nint, uint> AudioAttachedOutput_GetID { get; }
430431
public delegate* unmanaged[Cdecl]<nint, uint> AudioFilter_GetID { get; }
@@ -1664,7 +1665,7 @@ private IntPtr GetUnmanagedPtr<T>(IDictionary<ulong, IntPtr> funcTable, ulong ha
16641665
public SharedLibrary(Dictionary<ulong, IntPtr> funcTable)
16651666
{
16661667
if (!funcTable.TryGetValue(0, out var capiHash)) Outdated = true;
1667-
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 554522947139118248UL) Outdated = true;
1668+
else if (capiHash == IntPtr.Zero || *(ulong*)capiHash != 9602013249028565151UL) Outdated = true;
16681669
Audio_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<Audio_GetIDDelegate>(funcTable, 4464042055475980737UL, Audio_GetIDFallback);
16691670
AudioAttachedOutput_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<AudioAttachedOutput_GetIDDelegate>(funcTable, 17725794901805112189UL, AudioAttachedOutput_GetIDFallback);
16701671
AudioFilter_GetID = (delegate* unmanaged[Cdecl]<nint, uint>) GetUnmanagedPtr<AudioFilter_GetIDDelegate>(funcTable, 8824535635529306325UL, AudioFilter_GetIDFallback);

api/AltV.Net/Elements/Entities/IVehicle.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Numerics;
4+
using AltV.Net.CApi.Data;
45
using AltV.Net.Data;
56
using AltV.Net.Enums;
67
using AltV.Net.Shared.Elements.Entities;
@@ -854,5 +855,8 @@ NumberPlateStyle GetNumberPlateStyleExt() =>
854855
float BrakeLevel { get; }
855856

856857
List<PlayerSeat> Passengers { get; }
858+
859+
void SetBage(string textureDictionary, string texture, VehicleBadgePosition[] vehicleBadgePosition);
860+
void SetBage(uint textureDictionary, uint texture, VehicleBadgePosition[] vehicleBadgePosition);
857861
}
858862
}

api/AltV.Net/Elements/Entities/Vehicle.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Numerics;
44
using System.Runtime.InteropServices;
5+
using AltV.Net.CApi.Data;
56
using AltV.Net.Data;
67
using AltV.Net.Enums;
78
using AltV.Net.Native;
@@ -2085,6 +2086,19 @@ public List<PlayerSeat> Passengers
20852086
}
20862087
}
20872088

2089+
public void SetBage(string textureDictionary, string texture, VehicleBadgePosition[] vehicleBadgePosition)
2090+
{
2091+
SetBage(Alt.Hash(textureDictionary), Alt.Hash(texture), vehicleBadgePosition);
2092+
}
2093+
2094+
public void SetBage(uint textureDictionary, uint texture, VehicleBadgePosition[] vehicleBadgePosition)
2095+
{
2096+
unsafe
2097+
{
2098+
Core.Library.Server.Vehicle_SetBadge(VehicleNativePointer, textureDictionary, texture, vehicleBadgePosition, (ushort)vehicleBadgePosition.Length);
2099+
}
2100+
}
2101+
20882102
public override void SetCached(IntPtr cachedVehicle)
20892103
{
20902104
this.VehicleNativePointer = cachedVehicle;

runtime

0 commit comments

Comments
 (0)