Pool::length

From RAGE Multiplayer Wiki
Revision as of 09:27, 5 May 2017 by SalwadoR (talk | contribs)

This property used for get pool elements count.

Note: this property is read-only.

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