Jump to content

Coordinates


Tails

Recommended Posts

Sorry, am lost once again.

function getCoord() 
 local x,y,z = getElementPosition(thePlayer) 
 outputChatbox("Coordinates: " .. getElementPosition(thePlayer) .."", getRootElement(), 255,0,255, true) 
 end 
 addCommandHandler("coord", getCoord) 

function getCoord() 
 local x,y,z = getElementPosition(thePlayer) 
 outputChatbox("Coordinates:", getRootElement(), 255,0,255, true, x, y, z) 
 end 
 addCommandHandler("coord", getCoord) 

Link to comment

--- edited .. thanks to Solidsnake14

  
function getCoord(thePlayer) 
local x,y,z = getElementPosition(thePlayer) 
outputChatBox("Coordinates:".." X"..x.." Y"..y.." Z"..z, getRootElement(), 255,0,255, true) 
end 
addCommandHandler("coord", getCoord) 
  

Edited by Guest
Link to comment

Well, first you must define 'thePlayer' in the function name, second you must define the x, y, z variables, like this:

local x, y, z = getElementPosition ( thePlayer ) 

And then output it to the player who used the command.

@UAEpro: You didn't define 'thePlayer', also, is outputChatBox, not outputChatbox.

Link to comment
Well, first you must define 'thePlayer' in the function name, second you must define the x, y, z variables, like this:
local x, y, z = getElementPosition ( thePlayer ) 

And then output it to the player who used the command.

@UAEpro: You didn't define 'thePlayer', also, is outputChatBox, not outputChatbox.

thanks .. i just fixed it to show the position without looking to the function xD my fault

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