PDA

View Full Version : Help getclientpos


GozarD
11-12-2014, 15:40
Im trying to get client position, but i want the values of X,Y,Z

this:


decl Float:VecOrigin[3];

GetClientAbsOrigin(client, VecOrigin);



give me: a float like 1660284623

I want to separate the X,Y and Z positions
I mean get X position, Y position and Z position
I saw a command like "m_vecNetworkOrigin.x" , "m_vecNetworkOrigin.y", "m_vecNetworkOrigin.z"

Any idea how to get this?

Powerlord
11-12-2014, 17:09
https://wiki.alliedmods.net/Vectors_Explained_%28Scripting%29

TL;DR VecOrigin[0] is X, VecOrigin[1] is Y, VecOrigin[2] is Z.

GozarD
11-12-2014, 18:34
OMG I did VecOrigin[1] is X, VecOrigin[2] is Y, VecOrigin[3] is Z

:P Thanks :D