@@ -68,6 +68,10 @@ public void Dispose()
6868GC . SuppressFinalize ( this ) ;
6969}
7070
71+
72+ /// <summary>
73+ /// Gets the number of members in the group.
74+ /// </summary>
7175public int MemberCount
7276{
7377get
@@ -82,30 +86,64 @@ public int MemberCount
8286}
8387}
8488
89+ /// <summary>
90+ /// Sets the maximum allowed distance from the group leader before a member leaves the group.
91+ /// </summary>
8592public float SeparationRange
8693{
8794set => Function . Call ( Hash . SET_GROUP_SEPARATION_RANGE , Handle , value ) ;
8895}
8996
97+ /// <summary>
98+ /// Sets the <see cref="Formation"/> this <see cref="PedGroup"/> will use.
99+ /// </summary>
90100public Formation Formation
91101{
92102set => Function . Call ( Hash . SET_GROUP_FORMATION , Handle , ( int ) value ) ;
93103}
94104
105+ /// <summary>
106+ /// Adds the specified <see cref="Ped"/> to this <see cref="PedGroup"/> as either a member or the leader.
107+ /// </summary>
108+ /// <param name="ped">The <see cref="Ped"/> to add to the group.</param>
109+ /// <param name="leader">
110+ /// If <c>true</c>, assigns the <paramref name="ped"/> as the group leader; otherwise, adds them as a regular member.
111+ /// </param>
112+ /// <remarks>
113+ /// The game checks against an internal limit of 8 members per group.
114+ /// </remarks>
95115public void Add ( Ped ped , bool leader )
96116{
97117Function . Call ( leader ? Hash . SET_PED_AS_GROUP_LEADER : Hash . SET_PED_AS_GROUP_MEMBER , ped . Handle , Handle ) ;
98118}
119+
120+ /// <summary>
121+ /// Removes the specified <see cref="Ped"/> from this <see cref="PedGroup"/>.
122+ /// </summary>
123+ /// <param name="ped">The <see cref="Ped"/> to remove from the group.</param>
99124public void Remove ( Ped ped )
100125{
101126Function . Call ( Hash . REMOVE_PED_FROM_GROUP , ped . Handle ) ;
102127}
103128
129+ /// <summary>
130+ /// Determines whether the specified <see cref="Ped"/> is a member of this <see cref="PedGroup"/>.
131+ /// </summary>
132+ /// <param name="ped">The <see cref="Ped"/> to check for membership.</param>
133+ /// <returns>
134+ /// <c>true</c> if the <paramref name="ped"/> is a member of this group; otherwise, <c>false</c>.
135+ /// </returns>
104136public bool Contains ( Ped ped )
105137{
106138return Function . Call < bool > ( Hash . IS_PED_GROUP_MEMBER , ped . Handle , Handle ) ;
107139}
108140
141+ /// <summary>
142+ /// Gets the leader <see cref="Ped"/> of this <see cref="PedGroup"/>.
143+ /// </summary>
144+ /// <returns>
145+ /// The leader <see cref="Ped"/> of the group, or <c>null</c> if the group has no leader.
146+ /// </returns>
109147public Ped Leader
110148{
111149get
@@ -115,17 +153,44 @@ public Ped Leader
115153}
116154}
117155
156+ /// <summary>
157+ /// Gets the member <see cref="Ped"/> at the specified index within this <see cref="PedGroup"/>.
158+ /// </summary>
159+ /// <param name="index">
160+ /// The zero-based index of the group member (0–7).
161+ /// </param>
162+ /// <returns>
163+ /// The <see cref="Ped"/> at the specified index, or <c>null</c> if no member exists at that position.
164+ /// </returns>
118165public Ped GetMember ( int index )
119166{
120167int handle = Function . Call < int > ( Hash . GET_PED_AS_GROUP_MEMBER , Handle , index ) ;
121168return handle != 0 ? new Ped ( handle ) : null ;
122169}
123170
171+ /// <summary>
172+ /// Returns all <see cref="Ped"/>s in this <see cref="PedGroup"/> as an array.
173+ /// </summary>
174+ /// <param name="includingLeader">
175+ /// If <c>true</c>, includes the group leader in the returned array; otherwise, only members are included.
176+ /// </param>
177+ /// <returns>
178+ /// An array of <see cref="Ped"/> objects representing the group's members (and optionally the leader).
179+ /// </returns>
124180public Ped [ ] ToArray ( bool includingLeader = true )
125181{
126182return ToList ( includingLeader ) . ToArray ( ) ;
127183}
128184
185+ /// <summary>
186+ /// Returns all <see cref="Ped"/>s in this <see cref="PedGroup"/> as a <c>List</c>.
187+ /// </summary>
188+ /// <param name="includingLeader">
189+ /// If <c>true</c>, includes the group leader in the returned list; otherwise, only members are included.
190+ /// </param>
191+ /// <returns>
192+ /// A list of <see cref="Ped"/> objects representing the group's members (and optionally the leader).
193+ /// </returns>
129194public List < Ped > ToList ( bool includingLeader = true )
130195{
131196int memberCount = MemberCount ;
@@ -156,7 +221,7 @@ public List<Ped> ToList(bool includingLeader = true)
156221}
157222
158223/// <summary>
159- ///Removes this <see cref="PedGroup"/>.
224+ ///Deletes this <see cref="PedGroup"/>.
160225/// </summary>
161226public override void Delete ( )
162227{