Skip to content

Commit e79b6bc

Browse files
Merge pull request #51 from DasChaosAT/master
Added documentation of Blip, Checkpoint and ColShape.
2 parents 69044c6 + 246784b commit e79b6bc

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

api/AltV.Net/Alt.Blip.cs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,86 @@ namespace AltV.Net
66
{
77
public partial class Alt
88
{
9+
/// <summary>
10+
/// Creates a blip for a specific player on a specific position.
11+
/// </summary>
12+
/// <param name="player">The player for which the blip is created.</param>
13+
/// <param name="type">The type of the blip.</param>
14+
/// <param name="pos">The position on which the blip is created.</param>
15+
/// <returns>The created Blip.</returns>
916
[MethodImpl(MethodImplOptions.AggressiveInlining)]
1017
public static IBlip CreateBlip(IPlayer player, byte type, Position pos) =>
1118
Module.Server.CreateBlip(player, type, pos);
1219

20+
/// <summary>
21+
/// Create a blip for a specific player, attached to specific entity.
22+
/// </summary>
23+
/// <param name="player">The player for which the blip is created.</param>
24+
/// <param name="type">The type of the blip.</param>
25+
/// <param name="entityAttach">The entity to which the blip is atteched to.</param>
26+
/// <returns>The created Blip.</returns>
1327
[MethodImpl(MethodImplOptions.AggressiveInlining)]
1428
public static IBlip CreateBlip(IPlayer player, byte type, IEntity entityAttach) =>
1529
Module.Server.CreateBlip(player, type, entityAttach);
1630

31+
/// <summary>
32+
/// Creates a blip for a specific player on a specific position.
33+
/// </summary>
34+
/// <param name="player">The player for which the blip is created.</param>
35+
/// <param name="type">The type of the blip.</param>
36+
/// <param name="pos">The position on which the blip is created.</param>
37+
/// <returns>The created Blip.</returns>
1738
[MethodImpl(MethodImplOptions.AggressiveInlining)]
1839
public static IBlip CreateBlip(IPlayer player, BlipType type, Position pos) =>
1940
Module.Server.CreateBlip(player, (byte) type, pos);
2041

42+
/// <summary>
43+
/// Creates a blip for a specific player, attached to specific entity.
44+
/// </summary>
45+
/// <param name="player">The player for which the blip is created.</param>
46+
/// <param name="type">The type of the blip.</param>
47+
/// <param name="entityAttach">The entity to which the blip is atteched to.</param>
48+
/// <returns>The created Blip.</returns>
2149
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2250
public static IBlip CreateBlip(IPlayer player, BlipType type, IEntity entityAttach) =>
2351
Module.Server.CreateBlip(player, (byte) type, entityAttach);
2452

53+
/// <summary>
54+
/// Creates a blip for all players on a specific position.
55+
/// </summary>
56+
/// <param name="type">The type of the blip.</param>
57+
/// <param name="pos">The position on which the blip is created.</param>
58+
/// <returns>The created Blip.</returns>
2559
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2660
public static IBlip CreateBlip(byte type, Position pos) =>
2761
Module.Server.CreateBlip(null, type, pos);
2862

63+
/// <summary>
64+
/// Creates a blip for all players, attached to specific entity.
65+
/// </summary>
66+
/// <param name="type">The type of the blip.</param>
67+
/// <param name="entityAttach">The entity to which the blip is atteched to.</param>
68+
/// <returns>The created Blip.</returns>
2969
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3070
public static IBlip CreateBlip(byte type, IEntity entityAttach) =>
3171
Module.Server.CreateBlip(null, type, entityAttach);
3272

73+
/// <summary>
74+
/// Creates a blip for all players on a specific position.
75+
/// </summary>
76+
/// <param name="type">The type of the blip.</param>
77+
/// <param name="pos">The position on which the blip is created.</param>
78+
/// <returns>The created Blip.</returns>
3379
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3480
public static IBlip CreateBlip(BlipType type, Position pos) =>
3581
Module.Server.CreateBlip(null, (byte) type, pos);
3682

83+
/// <summary>
84+
/// Creates a blip for all players, attached to specific entity.
85+
/// </summary>
86+
/// <param name="type">The type of the blip.</param>
87+
/// <param name="entityAttach">The entity to which the blip is atteched to.</param>
88+
/// <returns>The created Blip.</returns>
3789
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3890
public static IBlip CreateBlip(BlipType type, IEntity entityAttach) =>
3991
Module.Server.CreateBlip(null, (byte) type, entityAttach);

api/AltV.Net/Alt.Checkpoint.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,57 @@ namespace AltV.Net
55
{
66
public partial class Alt
77
{
8+
/// <summary>
9+
/// Creates a checkpoint for a specific player, with given type, position, radius, height and color.
10+
/// </summary>
11+
/// <param name="player">The player for which the checkpoint is created.</param>
12+
/// <param name="type">The type of the checkpoint.</param>
13+
/// <param name="pos">The position of the checkpoint.</param>
14+
/// <param name="radius">The size of the checkpoint.</param>
15+
/// <param name="height">The height of the checkpoint.</param>
16+
/// <param name="color">The color of the checkpoint.</param>
17+
/// <returns>The created Checkpoint.</returns>
818
public static ICheckpoint CreateCheckpoint(IPlayer player, byte type, Position pos, float radius, float height,
919
Rgba color) =>
1020
Module.Server.CreateCheckpoint(player, type, pos, radius, height, color);
1121

22+
/// <summary>
23+
/// Creates a checkpoint for a specific player, with given type, position, radius, height and color.
24+
/// </summary>
25+
/// <param name="player">The player for which the checkpoint is created.</param>
26+
/// <param name="type">The type of the checkpoint.</param>
27+
/// <param name="pos">The position of the checkpoint.</param>
28+
/// <param name="radius">The size of the checkpoint.</param>
29+
/// <param name="height">The height of the checkpoint.</param>
30+
/// <param name="color">The color (of the checkpoint.</param>
31+
/// <returns>The created Checkpoint.</returns>
1232
public static ICheckpoint CreateCheckpoint(IPlayer player, CheckpointType type, Position pos, float radius,
1333
float height,
1434
Rgba color) =>
1535
Module.Server.CreateCheckpoint(player, (byte) type, pos, radius, height, color);
1636

37+
/// <summary>
38+
/// Creates a checkpoint for a all players, with given type, position, radius, height and color.
39+
/// </summary>
40+
/// <param name="type">The type of the checkpoint.</param>
41+
/// <param name="pos">The position of the checkpoint.</param>
42+
/// <param name="radius">The size of the checkpoint.</param>
43+
/// <param name="height">The height of the checkpoint.</param>
44+
/// <param name="color">The color of the checkpoint.</param>
45+
/// <returns>The created Checkpoint.</returns>
1746
public static ICheckpoint CreateCheckpoint(byte type, Position pos, float radius, float height,
1847
Rgba color) =>
1948
Module.Server.CreateCheckpoint(null, type, pos, radius, height, color);
2049

50+
/// <summary>
51+
/// Creates a checkpoint for a all players, with given type, position, radius, height and color.
52+
/// </summary>
53+
/// <param name="type">The type of the checkpoint.</param>
54+
/// <param name="pos">The position of the checkpoint.</param>
55+
/// <param name="radius">The size of the checkpoint.</param>
56+
/// <param name="height">The height of the checkpoint.</param>
57+
/// <param name="color">The color of the checkpoint.</param>
58+
/// <returns></returns>
2159
public static ICheckpoint CreateCheckpoint(CheckpointType type, Position pos, float radius,
2260
float height,
2361
Rgba color) =>

api/AltV.Net/Alt.ColShape.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,57 @@ namespace AltV.Net
55
{
66
public partial class Alt
77
{
8+
/// <summary>
9+
/// Creates a alt:V cylinder colshape with specigic height.
10+
/// </summary>
11+
/// <param name="pos">The position of the colshape.</param>
12+
/// <param name="radius">The size of the colshape.</param>
13+
/// <param name="height">The height of the colshape.</param>
14+
/// <returns>The created colshape.</returns>
815
public static IColShape CreateColShapeCylinder(Position pos, float radius, float height)
916
{
1017
return Module.Server.CreateColShapeCylinder(pos, radius, height);
1118
}
1219

20+
/// <summary>
21+
/// Creates a alt:V sphere colshape.
22+
/// </summary>
23+
/// <param name="pos">The position of the colshape.</param>
24+
/// <param name="radius">The size of the colshape.</param>
25+
/// <returns>The created colshape.</returns>
1326
public static IColShape CreateColShapeSphere(Position pos, float radius)
1427
{
1528
return Module.Server.CreateColShapeSphere(pos, radius);
1629
}
1730

31+
/// <summary>
32+
/// Creates a alt:V cylinder colshape with no height (from bottom to top of the height of the map).
33+
/// </summary>
34+
/// <param name="pos">The position of the colshape.</param>
35+
/// <param name="radius">The size of the colshape.</param>
36+
/// <returns>The created colshape.</returns>
1837
public static IColShape CreateColShapeCircle(Position pos, float radius)
1938
{
2039
return Module.Server.CreateColShapeCircle(pos, radius);
2140
}
2241

42+
/// <summary>
43+
/// Creates a alt:V cube colshape between two positions.
44+
/// </summary>
45+
/// <param name="pos">The first position of the colshape.</param>
46+
/// <param name="pos2">The second position of the colshape.</param>
47+
/// <returns>The created colshape.</returns>
2348
public static IColShape CreateColShapeCube(Position pos, Position pos2)
2449
{
2550
return Module.Server.CreateColShapeCube(pos, pos2);
2651
}
2752

53+
/// <summary>
54+
/// Creates a alt:v cube colshape between two positions with no height (from vottom to top of the height of the map).
55+
/// </summary>
56+
/// <param name="pos">The first position of the colshape.</param>
57+
/// <param name="pos2">The second position of the colshape.</param>
58+
/// <returns>The created colshape.</returns>
2859
public static IColShape CreateColShapeRectangle(Position pos, Position pos2)
2960
{
3061
return Module.Server.CreateColShapeRectangle(pos, pos2);

0 commit comments

Comments
 (0)