Jump to content

object handle position


Freamee

Recommended Posts

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.xplayer.position.yplayer.position.z1.52594689830falsetruetrue);
Link to comment
Share on other sites

1 hour ago, concil said:

foundTicketATM.position 

 

The commented part, gave me undefined position.

var foundTicketATM = mp.game.object.getClosestObjectOfType(player.position.xplayer.position.yplayer.position.z1.52594689830falsetruetrue);
    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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...