Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

SetPauseScriptOnDisconnectStatus

Enables or disables automatic script pausing when the character disconnects from the server.

ValueTrue 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.

Включает или отключает автоматическую приостановку скрипта при отключении персонажа от сервера.

ValueTrue для приостановки скрипта при отключении, False для продолжения выполнения.

При включении выполнение скрипта приостанавливается при отключении и возобновляется при восстановлении соединения (например, через автопереподключение). Это предотвращает выполнение игровых команд во время отключения, которые иначе были бы молча отброшены.

Используйте GetPauseScriptOnDisconnectStatus для чтения текущего состояния.

Не выполняет действий, если персонаж не подключён.

Pascal

procedure SetPauseScriptOnDisconnectStatus(Value: Boolean);

Python

def SetPauseScriptOnDisconnectStatus(Value: bool) -> None: ...

Pascal Example

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.

Python Example

SetPauseScriptOnDisconnectStatus(True)
SetARStatus(True)
AddToSystemJournal('Script will pause on disconnect')

while True:
    if Connected():
        AddToSystemJournal('Working...')
    Wait(5000)

See Also

GetPauseScriptOnDisconnectStatus, SetARStatus, Connected