Hi, I was trying to set some enum values to a virtual entity's dataDict dictionary on server side (both a custom one and one from AltV.Net.Shared.Enums) and the server was complaining that it cannot convert those enums so I've created MValueAdapters for both but now on client side the value will always be the default value for the enum, should MValue adapters even work for VirtualEntity dataDict?
Server version: 15.48 (release)
Nuget version: 15.0.5
Server side code:
Dictionary<string, object> data = new()
{
{ "type", VirtualEntityType.Marker },
{ "markerType", MarkerType.MarkerCylinder },
{ "color", color },
{ "scale", (Position)scale },
{ "faceCamera", faceCamera },
};
VirtualEntity = Alt.CreateVirtualEntity(_virtualEntityGroup, Position - new Position(0, 0, 1), 20, data);
Client side code:
var hasType = virtualEntity.HasStreamSyncedMetaData("type");
var hasType2 = virtualEntity.GetStreamSyncedMetaData("type", out VirtualEntityType type);
var hasMarkerType = virtualEntity.HasStreamSyncedMetaData("markerType");
var hasMarkerType2 = virtualEntity.GetStreamSyncedMetaData("markerType", out MarkerType markerType);
Alt.Log($"[DATA CHECK] hasType {hasType} {hasType2} {type}");
Alt.Log($"[DATA CHECK] hasMarkerType {hasMarkerType} {hasMarkerType2} {markerType}");
Hi, I was trying to set some enum values to a virtual entity's dataDict dictionary on server side (both a custom one and one from AltV.Net.Shared.Enums) and the server was complaining that it cannot convert those enums so I've created MValueAdapters for both but now on client side the value will always be the default value for the enum, should MValue adapters even work for VirtualEntity dataDict?
Server version: 15.48 (release) Nuget version: 15.0.5
Server side code:
Client side code:
Client side log:
Custom enum:
MValueAdapter (both looks the same):