-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Alt.Pools.cs
104 lines (68 loc) · 4.98 KB
/
Alt.Pools.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AltV.Net.Elements.Entities;
using AltV.Net.Elements.Pools;
namespace AltV.Net;
public partial class Alt
{
public static void AddToPool(IBaseObject baseObject) => CoreImpl.PoolManager.Add(baseObject);
public static IReadOnlyCollection<IPlayer> GetAllPlayers() => CoreImpl.PoolManager.Player.GetAllEntities();
public static IReadOnlyCollection<IVehicle> GetAllVehicles() => CoreImpl.PoolManager.Vehicle.GetAllEntities();
public static IReadOnlyCollection<IPed> GetAllPeds() => CoreImpl.PoolManager.Ped.GetAllEntities();
public static IReadOnlyCollection<IBlip> GetAllBlips() => CoreImpl.PoolManager.Blip.GetAllObjects();
public static IReadOnlyCollection<IObject> GetAllNetworkObjects() => CoreImpl.PoolManager.Object.GetAllEntities();
public static IReadOnlyCollection<ICheckpoint> GetAllCheckpoints() =>
CoreImpl.PoolManager.Checkpoint.GetAllObjects();
public static IReadOnlyCollection<IVoiceChannel> GetAllVoiceChannels() =>
CoreImpl.PoolManager.VoiceChannel.GetAllObjects();
public static IReadOnlyCollection<IColShape> GetAllColShapes() => CoreImpl.PoolManager.ColShape.GetAllObjects();
public static IReadOnlyCollection<IMarker> GetAllMarkers() => CoreImpl.PoolManager.Marker.GetAllObjects();
public static IReadOnlyCollection<IConnectionInfo> GetAllConnectionInfos() =>
CoreImpl.PoolManager.ConnectionInfo.GetAllObjects();
public static IReadOnlyCollection<IVirtualEntity> GetAllVirtualEntities() =>
CoreImpl.PoolManager.VirtualEntity.GetAllObjects();
public static IReadOnlyCollection<IVirtualEntityGroup> GetAllVirtualEntityGroups() =>
CoreImpl.PoolManager.VirtualEntityGroup.GetAllObjects();
public static KeyValuePair<IntPtr, IPlayer>[] GetPlayersArray() => CoreImpl.PoolManager.Player.GetEntitiesArray();
public static KeyValuePair<IntPtr, IVehicle>[] GetVehiclesArray() =>
CoreImpl.PoolManager.Vehicle.GetEntitiesArray();
public static KeyValuePair<IntPtr, IPed>[] GetPedsArray() => CoreImpl.PoolManager.Ped.GetEntitiesArray();
public static KeyValuePair<IntPtr, IBlip>[] GetBlipsArray() => CoreImpl.PoolManager.Blip.GetObjectsArray();
public static KeyValuePair<IntPtr, ICheckpoint>[] GetCheckpointsArray() =>
CoreImpl.PoolManager.Checkpoint.GetObjectsArray();
public static KeyValuePair<IntPtr, IVoiceChannel>[] GetVoiceChannelsArray() =>
CoreImpl.PoolManager.VoiceChannel.GetObjectsArray();
public static KeyValuePair<IntPtr, IColShape>[] GetColShapesArray() =>
CoreImpl.PoolManager.ColShape.GetObjectsArray();
public static KeyValuePair<IntPtr, IConnectionInfo>[] GetConnectionInfoArray() =>
CoreImpl.PoolManager.ConnectionInfo.GetObjectsArray();
public static void ForEachPlayers(IBaseObjectCallback<IPlayer> baseObjectCallback) =>
CoreImpl.PoolManager.Player.ForEach(baseObjectCallback);
public static Task ForEachPlayers(IAsyncBaseObjectCallback<IPlayer> baseObjectCallback) =>
CoreImpl.PoolManager.Player.ForEach(baseObjectCallback);
public static void ForEachVehicles(IBaseObjectCallback<IVehicle> baseObjectCallback) =>
CoreImpl.PoolManager.Vehicle.ForEach(baseObjectCallback);
public static Task ForEachVehicles(IAsyncBaseObjectCallback<IVehicle> baseObjectCallback) =>
CoreImpl.PoolManager.Vehicle.ForEach(baseObjectCallback);
public static void ForEachPeds(IBaseObjectCallback<IPed> baseObjectCallback) =>
CoreImpl.PoolManager.Ped.ForEach(baseObjectCallback);
public static Task ForEachPeds(IAsyncBaseObjectCallback<IPed> baseObjectCallback) =>
CoreImpl.PoolManager.Ped.ForEach(baseObjectCallback);
public static void ForEachBlips(IBaseObjectCallback<IBlip> baseObjectCallback) =>
CoreImpl.PoolManager.Blip.ForEach(baseObjectCallback);
public static Task ForEachBlips(IAsyncBaseObjectCallback<IBlip> baseObjectCallback) =>
CoreImpl.PoolManager.Blip.ForEach(baseObjectCallback);
public static void ForEachCheckpoints(IBaseObjectCallback<ICheckpoint> baseObjectCallback) =>
CoreImpl.PoolManager.Checkpoint.ForEach(baseObjectCallback);
public static Task ForEachCheckpoints(IAsyncBaseObjectCallback<ICheckpoint> baseObjectCallback) =>
CoreImpl.PoolManager.Checkpoint.ForEach(baseObjectCallback);
public static void ForEachVoiceChannels(IBaseObjectCallback<IVoiceChannel> baseObjectCallback) =>
CoreImpl.PoolManager.VoiceChannel.ForEach(baseObjectCallback);
public static Task ForEachVoiceChannels(IAsyncBaseObjectCallback<IVoiceChannel> baseObjectCallback) =>
CoreImpl.PoolManager.VoiceChannel.ForEach(baseObjectCallback);
public static void ForEachColShapes(IBaseObjectCallback<IColShape> baseObjectCallback) =>
CoreImpl.PoolManager.ColShape.ForEach(baseObjectCallback);
public static Task ForEachColShapes(IAsyncBaseObjectCallback<IColShape> baseObjectCallback) =>
CoreImpl.PoolManager.ColShape.ForEach(baseObjectCallback);
}