Jump to content

Co-ordinates


Lloyd Logan

Recommended Posts

I stopped scripting for about 3 months, i feel i have forgotten everything

function mycoords (thePlayer, command) 
    local x, y, z getElementPostition ( thePlayer ) 
        outputChatBox ( "X pos " .. x .. " Y pos " .. y .. " Z pos" .. z ".") 
end 
addCommandHandler("mycoords", mycoords) 

attempt to call global 'getElementPosition'

Should be easy for you guys!

Link to comment
function mycoords (thePlayer, command) 
    local x, y,z =  getElementPosition( thePlayer ) --forgot to put the '=' symbol 
    outputChatBox ( "X pos " .. x .. " Y pos " .. y .. " Z pos" .. z .. ".") --forgot to add the last '..' after the z coordinate 
end 
addCommandHandler("mycoords", mycoords) 

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