Bogdan04 Posted July 19, 2020 Posted July 19, 2020 Hi, I'm trying to get a player coords. mp.events.addCommand("pos", (player) => { new x; new y; new z; const localplayer = mp.players.local(new mp.Vector3(x, y, z)); let pPos = localplayer.getCoords(); mp.gui.chat.push("Coords: " + JSON.stringify(pPos)); }); But this does not work. Any help please? Thank you.
Section80 Posted July 20, 2020 Posted July 20, 2020 mp.events.addCommand("pos", (player) => { player.outputChatBox("Coords: " + JSON.stringify(player.position)); }); This should be all you need to output player's position. This is a server side script. It looks like you were mixing server-side scripting with client-side scripting in your code. I'd suggest taking a look at the RageMP Wiki for some tips. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now