Pool::length
Jump to navigation
Jump to search
This property is used to get the element count of a pool.
Note: this property is read-only.
Syntax
Number pool.length;
Example
This example will return vehicles and players count.
Server-Side
let getStuffCount = () => { return [mp.players.length, mp.vehicles.length]; }; let [players, vehicles] = getStuffCount(); console.log(`Server have ${vehicles} vehicles and ${players} players.`)
See Also
- Functions
- Properties
- Arrays