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 
)    

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

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!??

in game nickname: [GFL]TimiimiT

Posted

but i have attach them and it worked!!!

i just want to know how to detect if is any object in marker(not only one specified)!!

in game nickname: [GFL]TimiimiT

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.

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted
Remember is detected only mta elements( object ).

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

Use processLineOfSight.

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted (edited)
but marker hit the fence! is that mta element?

If this 'fence' is mta element then it detected or otherwise not detected.

If not detected you need use https://wiki.multitheftauto.com/wiki/ProcessLineOfSight and scan radius in onClientRender event.

Edited by Guest

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

GTA object: original map object.

MTA object: created via a script/map editor.

If I helped you, please click the like button on the right ;) Thanks!

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)

in game nickname: [GFL]TimiimiT

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

in game nickname: [GFL]TimiimiT

Posted
but marker hit the fence! is that mta element?

If this 'fence' is mta element then it detected or otherwise not detected.

If not detected you need use https://wiki.multitheftauto.com/wiki/ProcessLineOfSight and scan radius in onClientRender event.

I don't know how to use :!:

Doesn't this detect only if you are ON element :?:

in game nickname: [GFL]TimiimiT

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