Pool::at: Difference between revisions
CocaColaBear (talk | contribs) No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
void pool.at(int ID) | void pool.at(int ID) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | |||
*'''ID:''' Element ID, what need get from pool. | |||
==Example== | ==Example== | ||
Revision as of 14:17, 19 May 2017
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
- Functions
- Properties
- Arrays