File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ NB! In the next versions I will make Non-ReAPI support
5656``` Pawn
5757const PMM_ALL_POINTS = -1;
5858
59+ /**
60+ * Gets the number of points by the name of the object from the dynamic array.
61+ *
62+ * @param szObjectName Name of the object
63+ * If you specify "*" = find points from all objects
64+ * If object is invalid name (can't find) = automatically sets "general" (first from ObjectNames)
65+ *
66+ * @return Returns the number of points in the name of the object.
67+ */
68+ native pmm_points_count( const szObjectName[ ] = "general" );
69+
5970/**
6071 * Get a point index or an array of point indexes into a dynamic array.
6172 *
@@ -202,3 +213,25 @@ if ( arPoints != Invalid_Array )
202213// Clearing the main array from the points of the "presents" object
203214pmm_clear_points( "presents" );
204215```
216+
217+ * Get the number of ALL available points*
218+ ``` Pawn
219+ {
220+ // some code
221+
222+ new iPointsCount = pmm_points_count( "*" );
223+
224+ // some code
225+ }
226+ ```
227+
228+ * Get the number of points in an object*
229+ ``` Pawn
230+ {
231+ // some code
232+
233+ new iPointsCount = pmm_points_count( "presents" );
234+
235+ // some code
236+ }
237+ ```
You can’t perform that action at this time.
0 commit comments