Yes, just retrieve the origin property, however "comes the position of the player who did the command" won't work since you cannot find out which player on the server has logged on as admin and commanded the console.
(ie. You cannot get any cvar information from the clients through scripting and both "rconaddress" and "password" are cvars).
Perhaps through the Admin Pro Menu, I recall it having some sort of admin system.
&player.origin?? I'm doubtful that would return your origin.
1) you forgot the kind of variable: local.
2) What is that & doing there?
3) You are asking how to access all players, so obviously this would only work if you defined local.player = parm.other in a trigger.
All players are tallied in the $player array. Therefore you'll have to scan this array to find yourself or someone else. Since the first person to enter the server is $player[1], the second $player[2] etc... but if the first player leaves, the array automatically adjusts it, so the second player becomes $player[1] and so on (in other words, the array doesn't leave any gaps).
Basically you'll need some property to find a certain player and since .netname only works in BT and a patched SH it's harder than you think.
If you just want a random player, just pick a random $player array slot.
Code: Select all
for (local.i = 1; local.i <= $player.size; local.i++)
{
if ( $player[local.i].blah == local.blah ) //we got our man
{
//....
}
}
or pick a random guy:
Code: Select all
local.guy = $player[(randomint($player.size) + 1)]
or a random guy's origin:
Code: Select all
local.guy = $player[(randomint($player.size) + 1)].origin