Hello, Guest

By registering with us, you'll be able to discuss, share and private message with other members of our community.
What's new

SCRIPT Coordinates

Alexalsaud

Administrative
Staff member
Admin
Joined
Aug 5, 2024
Messages
337
ICoins
1,301

Coordinates


This script displays the coordinates to the top of the screen. Uses an event renderer, which means that the coordinates will be updated with each of your frames :)

For training and understanding how the code works, it will do very well.

JavaScript:
##Client Side

mp.events.add('render', () => {
    
    const player = mp.players.local;

    mp.game.graphics.drawText(`X: ${player.position.x.toFixed(2)}, Y: ${player.position.y.toFixed(2)}, Z: ${player.position.z.toFixed(2)}`, [0.5, 0.010], {
        font: 4,
        color: [255, 255, 255, 255],
        scale: [0.4, 0.4],
        outline: true
    });
});
 
Back
Top