Skip to content

Commit d441548

Browse files
authored
added virtual entity get all to alt class (#802)
1 parent 67f9064 commit d441548

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

api/AltV.Net.Client/Alt.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static bool GetBaseObjectById(BaseObjectType type, uint id, [MaybeNullWhe
6464
public static IReadOnlyCollection<ILocalVehicle> GetAllLocalVehicles() => Core.GetAllLocalVehicles();
6565
public static IReadOnlyCollection<ILocalPed> GetAllLocalPeds() => Core.GetAllLocalPeds();
6666
public static IReadOnlyCollection<ILocalObject> GetAllWorldObjects() => Core.GetAllWorldObjects();
67+
public static IReadOnlyCollection<IVirtualEntity> GetAllVirtualEntities() => Core.GetAllVirtualEntities();
68+
public static IReadOnlyCollection<IVirtualEntityGroup> GetAllVirtualEntityGroups() => Core.GetAllVirtualEntityGroups();
6769
public static IReadOnlyCollection<IEntity> GetAllEntities() => GetAllPlayers().Concat<IEntity>(GetAllVehicles()).Concat(GetAllLocalObjects()).Concat(GetAllWorldObjects()).ToList();
6870

6971
public static void EmitServer(string eventName, params object[] args) => Core.TriggerServerEvent(eventName, args);

api/AltV.Net/Alt.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ public static void EmitUnreliableClients(IPlayer[] clients, string eventName, pa
6464

6565
public static IReadOnlyCollection<IConnectionInfo> GetAllConnectionInfos() => Core.PoolManager.ConnectionInfo.GetAllObjects();
6666

67+
public static IReadOnlyCollection<IVirtualEntity> GetAllVirtualEntities() => Core.PoolManager.VirtualEntity.GetAllObjects();
68+
69+
public static IReadOnlyCollection<IVirtualEntityGroup> GetAllVirtualEntityGroups() => Core.PoolManager.VirtualEntityGroup.GetAllObjects();
70+
6771
public static KeyValuePair<IntPtr, IPlayer>[] GetPlayersArray() => Core.PoolManager.Player.GetEntitiesArray();
6872

6973
public static KeyValuePair<IntPtr, IVehicle>[] GetVehiclesArray() => Core.PoolManager.Vehicle.GetEntitiesArray();

0 commit comments

Comments
 (0)