Padul Posted June 27, 2016 Posted June 27, 2016 function forObjPosition ( thePlayer, command ) local padx,pady,padz = getElementPosition ( thePlayer ) outputConsole ( "{" .. padx .. "," .. pady .. "," .. padz .. "}," ) end addCommandHandler("mypos",forObjPosition) What had i done bad? MTA Dayz textures and objects: http://padulmods.blogspot.com/
Walid Posted June 27, 2016 Posted June 27, 2016 Try this : -- server side function forObjPosition ( thePlayer, command ) if thePlayer and isElement(thePlayer) then local padx,pady,padz = getElementPosition(thePlayer) outputChatBox ("{" .. padx .. "," .. pady .. "," .. padz .. "}",thePlayer,0,255,0) end end addCommandHandler("mypos",forObjPosition) if you are trying to use this code client side just remove the argument thePlayer and replace it in your code with localPlayer. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Padul Posted June 28, 2016 Author Posted June 28, 2016 ok, its working ,thank you MTA Dayz textures and objects: http://padulmods.blogspot.com/
Tails Posted June 28, 2016 Posted June 28, 2016 Nothing was wrong with your code. It was just outputting it to the console. There's really no need for "if thePlayer and isElement(thePlayer) then" with onCommandHandler. Discord: its.tails
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