Jump to content

get object from world map


iPanda

Recommended Posts

Posted

Hi, guys. I wonder how I can get the element object of the standard GTA world map

For example it is necessary to retrieve the object of the hangar from the area 51. How do I do this, what events handler help?

Posted
You can't "get the element", but you can get the object model with processLineOfSight.

I know little this function. My test was unsuccessful.

addEventHandler('onClientRender',root,function() 
    local w,h = guiGetScreenSize() 
    local tx,ty,tz = getWorldFromScreenPosition(w/2,h/2,2) 
    local px,py,pz = getCameraMatrix() 
    _,_,_,_,_,_,_,_,_,_,_,model = processLineOfSight(px,py,pz,tx,ty,tz,true,true,true,true,true,true,true,true,nil,true) 
    outputChatBox(tostring(model)) 
end) 

I would like to get the ID model world before player to the chat. Return nil. Can you fix my code, so I got what I need?

Posted

But which object do you want it to check? the one infront of the player or what?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
But which object do you want it to check? the one infront of the player or what?

I need to get the object world id infront the player.

Ps5lZVVQzJM.jpg

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
  • Recently Browsing   0 members

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