"For developers", "Server scripts", "Functions description", "Users", "mIsUINOnline".
Function to check if a user with a specified UIN is online or not.
function mIsUINOnline(iUIN: integer): boolean;
Parameter |
Type |
Value |
---|---|---|
iUIN |
integer |
unique user identifier. |
true, if the user is connected to the server and online, false — if disconnected (offline). Built-in bot Elisa (UIN=0) is always online.
const
iUIN = 0; // user UIN for test, set your own number
var
sUserName: string;
begin
sUserName := mGetUserAttribute(iUIN, 'InternalNickName');
if mIsUINOnline(iUIN) then mLogScript('UIN: ' + inttostr(iUIN) + ', nickname "' + sUserName + '" is online now', '')
else mLogScript('UIN: ' + inttostr(iUIN) + ', nickname "' + sUserName + '" is offline', '');
end.
[19:00:02] (Log "mIsUINOnline"): UIN: 0, nickname "Elisa" is online now
[19:00:02] (Run "mIsUINOnline"): Script operation time: 3 ms
[19:00:02] (Run "mIsUINOnline"): Script done successfully.