hi there, i need some help on getting the x, y and z of players using a chat command. Here is my code that is nearly right (i think) but keeps returning 0 on X, Y and Z:
@name
@inputs
@outputs X Y Z
@persist
@trigger
runOnChat(1)
if(chatClk(owner()))
{
ChatCommand="!getxyz "
if(owner():lastSaid():left( ChatCommand:length() ):find(ChatCommand))
{
Plyname=owner():lastSaid():right(owner():lastSaid():length()-ChatCommand:length())
findByName(Plyname)
Ply=find()
X=Ply:pos():x()
Y=Ply:pos():y()
Z=Ply:pos():z()
}
}
After the !getxyz i would write a name of a player and it would then output the values to the screens X, Y and Z.
Thanks for reading.