Timiimit Posted February 5, 2012 Posted February 5, 2012 Hi! is it possible to detect object in marker? in game nickname: [GFL]TimiimiT
Kenix Posted February 5, 2012 Posted February 5, 2012 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.
Timiimit Posted February 5, 2012 Author Posted February 5, 2012 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
Xeno Posted February 5, 2012 Posted February 5, 2012 I don't think you can attach markers. Use a col shape.
Timiimit Posted February 5, 2012 Author Posted February 5, 2012 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
Kenix Posted February 5, 2012 Posted February 5, 2012 Use event onMarkerHit. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Timiimit Posted February 5, 2012 Author Posted February 5, 2012 i have but how to detect if its any object in marker!!!!!!! post eg. plzz. in game nickname: [GFL]TimiimiT
Kenix Posted February 5, 2012 Posted February 5, 2012 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.
Timiimit Posted February 5, 2012 Author Posted February 5, 2012 it's not working!?? in game nickname: [GFL]TimiimiT
Kenix Posted February 5, 2012 Posted February 5, 2012 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.
Timiimit Posted February 5, 2012 Author Posted February 5, 2012 It touched fence at begining of la airport. in game nickname: [GFL]TimiimiT
Timiimit Posted February 6, 2012 Author Posted February 6, 2012 well, no one knows??? in game nickname: [GFL]TimiimiT
Kenix Posted February 6, 2012 Posted February 6, 2012 Read my last post http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Timiimit Posted February 6, 2012 Author Posted February 6, 2012 but marker hit the fence! is that mta element? in game nickname: [GFL]TimiimiT
Kenix Posted February 6, 2012 Posted February 6, 2012 (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 February 7, 2012 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
myonlake Posted February 6, 2012 Posted February 6, 2012 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!
Timiimit Posted February 6, 2012 Author Posted February 6, 2012 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
Al3grab Posted February 6, 2012 Posted February 6, 2012 getDistanceBetweenPoints3D ING : [xXx]~Al3grab
Timiimit Posted February 6, 2012 Author Posted February 6, 2012 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
Timiimit Posted February 6, 2012 Author Posted February 6, 2012 anyone? in game nickname: [GFL]TimiimiT
Timiimit Posted February 7, 2012 Author Posted February 7, 2012 no one knows? in game nickname: [GFL]TimiimiT
Castillo Posted February 7, 2012 Posted February 7, 2012 This could help maybe? https://wiki.multitheftauto.com/wiki/OnPlayerContact San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted February 7, 2012 Posted February 7, 2012 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. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Timiimit Posted February 7, 2012 Author Posted February 7, 2012 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 This could help maybe?https://wiki.multitheftauto.com/wiki/OnPlayerContact Doesn't this detect only if you are ON element in game nickname: [GFL]TimiimiT
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now