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

IsGumpCanBeClosed

Returns True if the gump at the specified index can be closed by the user, False if it is marked as non-closable.

GumpIndex — index of the gump (0-based, as used by GetGumpInfo, GetGumpsCount).

Returns False if the character is disconnected.

Some server-sent gumps are flagged as non-closable, meaning the player must respond to them (e.g., by clicking a button) rather than dismissing them.

Возвращает True, если гамп с указанным индексом может быть закрыт пользователем, False — если он помечен как незакрываемый.

GumpIndex — индекс гампа (начиная с 0, как используется в GetGumpInfo, GetGumpsCount).

Возвращает False, если персонаж не подключён.

Некоторые серверные гампы помечены как незакрываемые — игрок должен ответить на них (например, нажать кнопку), а не просто закрыть.

Pascal

function IsGumpCanBeClosed(GumpIndex: Word): Boolean;

Python

def IsGumpCanBeClosed(GumpIndex: int) -> bool: ...

Pascal Example

begin
  if GetGumpsCount > 0 then
  begin
    if IsGumpCanBeClosed(0) then
      CloseSimpleGump(0)
    else
      AddToSystemJournal('Gump cannot be closed, must respond');
  end;
end.

Python Example

if GetGumpsCount() > 0:
    if IsGumpCanBeClosed(0):
        CloseSimpleGump(0)
    else:
        AddToSystemJournal('Gump cannot be closed, must respond')

See Also

GetGumpsCount, GetGumpInfo, CloseSimpleGump, WaitGump