Jump to content

[HELP] Intersecting colshapes


..:D&G:..

Recommended Posts

Is there any way to detect if the colshape is hitting a colshape with a specific elementData? Because isElementWithinColShape requires a certain colshape at argument 2 and I want to avoid using ipairs to check all the colshapes from the server, so is there any other way?

Link to comment
[url=https://wiki.multitheftauto.com/wiki/GetElementsWithinColShape]https://wiki.multitheftauto.com/wiki/Ge ... inColShape[/url] 
  
if [url=https://wiki.multitheftauto.com/wiki/GetElementData]https://wiki.multitheftauto.com/wiki/GetElementData[/url] ('dataname") == data then 
  
  
  
 

  
local cols = getElementsWithinColShape ( colshape, "colshape" )  
for theKey,colshapes in ipairs(cols) do  
if getElementData ( colshapes , "datakey" ) == data jah want 
then 
outputDebugString("So and so col shape is in another colshape, oh focking no.") 
  

Link to comment
[url=https://wiki.multitheftauto.com/wiki/GetElementsWithinColShape]https://wiki.multitheftauto.com/wiki/Ge ... inColShape[/url] 
  
if [url=https://wiki.multitheftauto.com/wiki/GetElementData]https://wiki.multitheftauto.com/wiki/GetElementData[/url] ('dataname") == data then 
  
  
  
  
 

  
local cols = getElementsWithinColShape ( colshape, "colshape" )  
for theKey,colshapes in ipairs(cols) do  
if getElementData ( colshapes , "datakey" ) == data jah want 
then 
outputDebugString("So and so col shape is in another colshape, oh focking no.") 
  

I know all this already lol, I wanted to avoid using ipairs loops to find the colshape, but I guess I'll have to use it :P

Thanks for the help!

Link to comment

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