Sign in to follow this  
Freamee

object handle position

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);

Share this post


Link to post
Share on other sites

It's not possible to return vector3 from world object handles in current version of ragemp.

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.