Jump to content

is it possible...


Timiimit

Recommended Posts

Posted

yes

local marker = createMarker( 0,0,0 ) 
local obj = createObject( 1337,0,0,0 )  
  
addCommandHandler( 'detect', 
    function( ) 
        if isElementWithinMarker( obj,marker ) then 
            outputChatBox ( 'object in marker' ) 
        end 
    end 
)    

Posted

no.

I attached marker to ped that it follows the ped.

now i must detect if anyobject is in marker not only one specified.

can i make this with "for" function?

if yes how!??

Posted

Server

  
addEventHandler( 'onMarkerHit',marker, -- marker variable 
    function( element,dim ) 
        if getElementType( element ) == 'object' then 
            outputChatBox( 'object detected' ) 
        end 
    end 
)    

Remember is detected only mta elements( object ).

If you enter the building ( not mta element ) it not detected.

Use processLineOfSight.

Posted
Remember is detected only mta elements( object ).

If you enter the building ( not mta element ) it not detected.

Use processLineOfSight.

Posted

then what can i use to detect GTA and MTA objects?

mabye onPedContactElement ( i have ped and what to detect when he comes close to object or any other element)

Posted

and how i I supposed to do this????????

i want to detect not only betwen two points!!!!

I want to detect if ped hit anything(mta and gta objects) or if is close to anything!!

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...