Sign in to follow this  
Freamee

if object id is close

Recommended Posts

Hi

I would like to make an ATM system, but not with fix positions.

If player is in close of ATM "object" let the command finish.

Share this post


Link to post
Share on other sites

returns true if object of type AtmObjectHash is found. Of course replace it with real object hash of atm. if true, fire your atm functions

var foundATM = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, parseFloat(radius), AtmObjectHash, false, true, true);

 

Share this post


Link to post
Share on other sites

Not working for me.

 

    var foundATM = mp.game.object.getClosestObjectOfType(player.position.xplayer.position.yplayer.position.z15.02930269768false);
 
    if(foundATM == true)
    {
        mp.game.graphics.notify(`~o~ Van a közeledben ATM.`);
    }

Share this post


Link to post
Share on other sites
vor 4 Stunden schrieb Freamee:

:(  How can i make it work with it

as i wrote above. Be sure to have all parameters. not sure if it will return the handle but however the variable will be set ans is true so its fine to use if(foundATM) ....

Edited by Flow

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.