LeozinH1 Posted May 9, 2018 Posted May 9, 2018 Hello everyone, is there any way to get the ID of all the players next to the client? I need to show the ID of player in nametag. Thanks
kemperrr Posted May 9, 2018 Posted May 9, 2018 (edited) you need the Player::remoteId property mp.events.add('render', () => { mp.players.forEachInStreamRange(player => { const position = player.position; mp.game.graphics.drawText(`${player.name} [${player.remoteId}]`, [position.x, position.y, position.z], { font: 4, color: [255, 255, 255, 255], scale: [0.5, 0.5], outline: true }) }); }); Edited May 9, 2018 by kemperrr 2
LeozinH1 Posted May 10, 2018 Author Posted May 10, 2018 1 hour ago, kemperrr said: you need the Player::remoteId property mp.events.add('render', () => { mp.players.forEachInStreamRange(player => { const position = player.position; mp.game.graphics.drawText(`${player.name} [${player.remoteId}]`, [position.x, position.y, position.z], { font: 4, color: [255, 255, 255, 255], scale: [0.5, 0.5], outline: true }) }); }); Thank you very much, my friend, I needed this a lot! 1
Recommended Posts