SetPauseScriptOnDisconnectStatus
Enables or disables automatic script pausing when the character disconnects from the server.
Value — True to pause the script on disconnect, False to let it continue running.
When enabled, the script execution is paused upon disconnect and resumes when the connection is restored (e.g., via auto-reconnect). This prevents scripts from executing game commands while disconnected, which would otherwise be silently discarded.
Use GetPauseScriptOnDisconnectStatus to read the current setting.
Does nothing if the character is not connected.
Включает или отключает автоматическую приостановку скрипта при отключении персонажа от сервера.
Value — True для приостановки скрипта при отключении, False для продолжения выполнения.
При включении выполнение скрипта приостанавливается при отключении и возобновляется при восстановлении соединения (например, через автопереподключение). Это предотвращает выполнение игровых команд во время отключения, которые иначе были бы молча отброшены.
Используйте GetPauseScriptOnDisconnectStatus для чтения текущего состояния.
Не выполняет действий, если персонаж не подключён.
procedure SetPauseScriptOnDisconnectStatus(Value: Boolean);
def SetPauseScriptOnDisconnectStatus(Value: bool) -> None: ...
begin
SetPauseScriptOnDisconnectStatus(True);
SetARStatus(True);
AddToSystemJournal('Script will pause on disconnect');
while True do
begin
// This code pauses automatically on disconnect
if Connected then
AddToSystemJournal('Working...');
Wait(5000);
end;
end.
SetPauseScriptOnDisconnectStatus(True)
SetARStatus(True)
AddToSystemJournal('Script will pause on disconnect')
while True:
if Connected():
AddToSystemJournal('Working...')
Wait(5000)