Force Save Player after Spawnpoint set

If not force save, sometimes the Spawnpoint is not saved after death (if to close after set)
This commit is contained in:
He-Man 2017-05-11 21:59:59 +02:00 committed by GitHub
parent e3335b411c
commit 0d0ee71dc4

View File

@ -36,6 +36,7 @@ if (alive _jammer) then {
// set position of spawnpoint to players SERVER_VARS
_server_vars set [0, getposATL _player]; // 0 = RESPAWN POS
_player setVariable ["SERVER_VARS", _server_vars];
[_player, _player getVariable["VARS", []]] call EPOCH_server_savePlayer;
["Spawnpoint set", 5] remoteExec ['Epoch_message',_player];
}
else
@ -43,6 +44,7 @@ if (alive _jammer) then {
// remove position of spawnpoint from players SERVER_VARS
_server_vars set [0, []]; // 0 = RESPAWN POS
_player setVariable ["SERVER_VARS", _server_vars];
[_player, _player getVariable["VARS", []]] call EPOCH_server_savePlayer;
["Spawnpoint removed", 5] remoteExec ['Epoch_message',_player];
};
}