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

Disarm

Removes items from both hands (right and left) to the character’s backpack.

Iterates through RhandLayer and LhandLayer, calling UnEquip for each occupied layer.

Returns False if the character is disconnected or if moving an item from a hand to the backpack failed. Returns True if both hands are empty after the call (including when they were already empty).

In Python, the implementation uses MoveItem for each hand layer.

Снимает предметы из обеих рук (правой и левой) в рюкзак персонажа.

Перебирает RhandLayer и LhandLayer, вызывая UnEquip для каждого занятого слоя.

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

В Python реализация использует MoveItem для каждого слоя руки.

Pascal

function Disarm: Boolean;

Python

def Disarm() -> bool: ...

Pascal Example

begin
  if ObjAtLayer(RhandLayer) <> 0 then
  begin
    if Disarm then
      AddToSystemJournal('Hands disarmed')
    else
      AddToSystemJournal('Disarm failed');
    Wait(1000);
  end;
end.

Python Example

if ObjAtLayerEx(RhandLayer(), Self()) != 0:
    if Disarm():
        AddToSystemJournal('Hands disarmed')
    else:
        AddToSystemJournal('Disarm failed')
    Wait(1000)

See Also

UnEquip, Undress, EquipDressSet, ObjAtLayerEx, Layers