Pool::at

From RAGE Multiplayer Wiki
Revision as of 14:17, 19 May 2017 by SalwadoR (talk | contribs)

This function used for return element from pool at ID.

Syntax

void pool.at(int ID)

Required Arguments

  • ID: Element ID, what need get from pool.

Example

That's example will return player by ID and output his name in console.

let player = mp.players.at(1488);
if (player) {
	console.log(`Player with id 1488 have nickname ${player.name}`);
} else {
	console.log(`Player by id 1488 does not exists...`);
};

See Also