Jump to content

How can i see what object in the world is close to me


Recommended Posts

Hello, I would like to know how I can obtain the information of an object (that has not been created by mp.objects.new) from the world or game by default that is close to me, that is:

If I am near an ATM and I want to get the position, the model and hash of that object, how do I do?

I managed to print an information in the chat when I am near some object that I want to scan using mp.game.object.getClosestObjectOfType(); but it failed to print the detailed information of the object as it tells me unknown and / or [object Object]


mp.events.add('get_scan', () => {
	let foundTicketATM = mp.game.object.getClosestObjectOfType(localPlayer.position.x, localPlayer.position.y, localPlayer.position.z, 1.9, 506770882, false, true, true);
		chatGlobal.execute(`chatAPI.push('object info: ${foundTicketATM}'); show2();`);


Link to comment
Share on other sites

  • Xabi locked this topic
This topic is now closed to further replies.
  • Recently Browsing   0 members

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