Freamee 0 Posted October 22 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
Flow 17 Posted October 23 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
Freamee 0 Posted October 30 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.`); } Share this post Link to post Share on other sites
LeonMrBonnie 5 Posted October 30 https://wiki.rage.mp/index.php?title=Object::getClosestObjectOfType The object does not return a boolean. It returns the object handle. Share this post Link to post Share on other sites
Freamee 0 Posted October 30 How can i make it work with it Share this post Link to post Share on other sites
Flow 17 Posted October 30 (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 by Flow Share this post Link to post Share on other sites