Pool::length
This function used for get pool elements count.
Syntax
int pool.length;
Example
That's example will return vehicles and players count.
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