Freamee Posted October 22, 2019 Posted October 22, 2019 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.
Flow Posted October 23, 2019 Posted October 23, 2019 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);
Freamee Posted October 30, 2019 Author Posted October 30, 2019 Not working for me. var foundATM = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, 15.0, 2930269768, false); if(foundATM == true) { mp.game.graphics.notify(`~o~ Van a közeledben ATM.`); }
LeonMrBonnie Posted October 30, 2019 Posted October 30, 2019 https://wiki.rage.mp/index.php?title=Object::getClosestObjectOfType The object does not return a boolean. It returns the object handle.
Flow Posted October 30, 2019 Posted October 30, 2019 (edited) 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 October 30, 2019 by Flow
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