Jump to content

Elements in colShape not recognized


Lavire

Recommended Posts

Hey there,

I'm working with colShapes for quite some time now, and they've worked so far. But now I'm working on a command where I need to know the objects in the player's range. The colShape is being created (I tested it already), but it says there is only 1 object in range (the player himself).

local x, y, z = getElementPosition(thePlayer) 
    local atmSphere = createColSphere(tonumber(x), tonumber(y), tonumber(z), tonumber(20.0)) 
    local atms = getElementsWithinColShape(atmSphere) 
    outputChatBox(tostring(table.getn(atms))) 

What am I doing wrong?

Edited by Guest
Link to comment

Oh, here's an example of the .map file, in which the objects are defined:

<object id="atm8" doublesided="false" model="2942" interior="0" dimension="0" posX="-1980.5885009766" posY="131.54470825195" posZ="27.33039855957" rotX="0" rotY="0" rotZ="270" type="atm" /> 

Edited by Guest
Link to comment
  • MTA Team

Definitely weird, I have no idea what to do then. I will try and get more people to see this topic and if they can't fix it I recommend you report it to MTA Bug Tracker

EDIT: Really sorry for the late reply, I know how it feels when someone doesn't help you.

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