Self
Returns the serial (ID) of the current character (player).
This is the primary way to obtain the player’s object ID, which is used as a parameter in many other API methods.
SelfID and PlayerID are aliases for this method.
Returns 0 if the character is not connected.
Возвращает serial (ID) текущего персонажа (игрока).
Это основной способ получения ID объекта игрока, который используется в качестве параметра во многих других методах API.
SelfID и PlayerID — алиасы для этого метода.
Возвращает 0, если персонаж не подключён.
function Self: Cardinal;
def Self() -> int: ...
begin
AddToSystemJournal('My ID: $' + IntToHex(Self, 8));
AddToSystemJournal('Position: ' + IntToStr(GetX(Self)) + ', ' +
IntToStr(GetY(Self)) + ', ' + IntToStr(GetZ(Self)));
RequestStats(Self);
end.
AddToSystemJournal(f'My ID: ${Self():08X}')
AddToSystemJournal(f'Position: {GetX(Self())}, {GetY(Self())}, {GetZ(Self())}')
RequestStats(Self())