Freamee Posted January 30, 2020 Share Posted January 30, 2020 Hi. I want to add 3d drawtexts to specify objects. I already have the handle of the object, but how can i get the position of the object handle? var foundTicketATM = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, 1.5, 2594689830, false, true, true); Link to comment Share on other sites More sharing options...
concil Posted January 30, 2020 Share Posted January 30, 2020 foundTicketATM.position Link to comment Share on other sites More sharing options...
Hazes Posted January 30, 2020 Share Posted January 30, 2020 It's not possible to return vector3 from world object handles in current version of ragemp. Link to comment Share on other sites More sharing options...
Freamee Posted January 30, 2020 Author Share Posted January 30, 2020 1 hour ago, concil said: foundTicketATM.position The commented part, gave me undefined position. var foundTicketATM = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, 1.5, 2594689830, false, true, true); if(foundTicketATM) { if(!Ticket.isActive()) { Ticket.toggleHud(true); mp.events.callRemote("TicketVasarloKozelben", true); mp.game.audio.playSoundFrontend(-1, "TOGGLE_ON", "HUD_FRONTEND_DEFAULT_SOUNDSET", true); } // mp.game.graphics.drawText(`Vonaljegy vásárlás`, [foundTicketATM.position.x, foundTicketATM.position.y, foundTicketATM.position.z], { // font: 0, // color: [255, 255, 255, 255], // scale: [0.2, 0.2], // centre: true // }); } 1 minute ago, Hazes said: It's not possible to return vector3 from world object handles in current version of ragemp. Ah okey. thank you. Link to comment Share on other sites More sharing options...
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