Players::local
Jump to navigation
Jump to search
Returns object of player. On client-side - current playing player, on server-side, maybe, first player.
Syntax
mp.players.local;
Example
setInterval(() => {
let player = mp.players.local;
if (player !== null) {
console.log(player.heading);
}
}, 5000);