mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
add previous location check
If you had set a spawnpoint previously at another location and attempt to set a new one, it would say "spawnpoint removed" instead of "set".
This commit is contained in:
parent
f4c0d24e42
commit
2c49a8ad93
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
build=708;
|
||||
build=709;
|
||||
|
@ -23,7 +23,10 @@ if (_player distance _jammer > 20) exitWith{};
|
||||
if (alive _jammer) then {
|
||||
if ((_jammer getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID _player, _player getVariable["GROUP", ""]]) then {
|
||||
_server_vars = _player getVariable["SERVER_VARS", []];
|
||||
if (_server_vars param [0,[]] isEqualTo []) then {
|
||||
_currentPos = _server_vars param [0,[]];
|
||||
// invalidate previous position
|
||||
if (_jammer distance _currentPos > 20) then { _currentPos = [] };
|
||||
if (_currentPos isEqualTo []) then {
|
||||
// set position of spawnpoint to players SERVER_VARS
|
||||
_server_vars set [0, getposATL _jammer]; // 0 = RESPAWN POS
|
||||
_player setVariable ["SERVER_VARS", _server_vars];
|
||||
|
@ -1 +1 @@
|
||||
build=708;
|
||||
build=709;
|
||||
|
@ -1 +1 @@
|
||||
build=708;
|
||||
build=709;
|
||||
|
Loading…
Reference in New Issue
Block a user