Pool::length: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 1: Line 1:
This function used for get pool elements count.
This property used for get pool elements count.


'''Note: this property is read-only.'''
'''Note: this property is read-only.'''

Revision as of 09:27, 5 May 2017

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