getting xyz player in script
Posted: Wed Jul 01, 2009 11:24 am
hello,
is there a way to get te players x y z through a script
someting like
so if i do the rcon comand "rcon mything 1"
then he says "if u see this it works
"
and in the var "ply_pos" comes the position of the player who did the command
is that possible or must i do that on another way?
and my second question:
if i do "&player.origin" it return my position
but if there more players than one it fails
can you replace the & for a id of a player
cause if thats treu i can make someting like this
and than in than in the rcon i make mythig the mumber of my id
(srry for bd english)"[/code]
is there a way to get te players x y z through a script
someting like
Code: Select all
if (int(getcvar(MYTHING)) > 0)
{
setcvar "MYTHING" "0"
iprintlnbold "if u see this it works :P"
setcvar "ply_pos" "X Y Z"
}
then he says "if u see this it works
and in the var "ply_pos" comes the position of the player who did the command
is that possible or must i do that on another way?
and my second question:
if i do "&player.origin" it return my position
but if there more players than one it fails
can you replace the & for a id of a player
cause if thats treu i can make someting like this
Code: Select all
if (int(getcvar(MYTHING)) > 0)
{
setcvar "MYTHING" "0"
iprintlnbold "if u see this it works :P"
setcvar "ply_pos" getcvar(mything)player.origin
}
(srry for bd english)"[/code]