admin: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= ?\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Some wiki formatting)
Line 8: Line 8:
|serverExec= server
|serverExec= server


|descr= This is dedicated server command, which queries the admin state of any client on the network by their client ([[owner]]) id. Possible results are:
|descr= This is dedicated server command, which queries the admin state of any client on the network by their client ([[owner]]) id.
* {{hl|1}} - client is admin that is [[server.cfg#Voted_In_Admin|voted in]]
{{Feature|informative|To self-check the admin state of a local client, use [[BIS_fnc_admin]].}}
* {{hl|2}} - client is admin that is [[server.cfg#Logged_In_Admin|logged in]]
In all other cases it returns 0. To self check the admin state of a local client, use [[BIS_fnc_admin]].


|s1= [[admin]] ownerID
|s1= [[admin]] ownerID
Line 19: Line 17:
|r1= [[Number]] - admin state of given client:
|r1= [[Number]] - admin state of given client:
* 0 - client is not an admin
* 0 - client is not an admin
* 1 - client is admin that is voted in
* 1 - client is admin that is [[server.cfg#Voted_In_Admin|voted in]]
* 2 - client is admin that is logged in
* 2 - client is admin that is [[server.cfg#Logged_In_Admin|logged in]]


|x1= <code>_isLoggedInAdmin = [[admin]] 3 == 2;</code>
|x1= <sqf>private _isLoggedInAdmin = admin 3 == 2;</sqf>
|x2= <code>_adminState = [[admin]] [[owner]] unit1;</code>
 
|x2= <sqf>private _adminState = admin owner unit1;</sqf>


|seealso= [[serverCommand]] [[serverCommandAvailable]] [[owner]] [[clientOwner]] [[remoteExecutedOwner]]
|seealso= [[serverCommand]] [[serverCommandAvailable]] [[owner]] [[clientOwner]] [[remoteExecutedOwner]]
}}
}}

Revision as of 21:09, 7 May 2022

Hover & click on the images for description

Description

Description:
This is dedicated server command, which queries the admin state of any client on the network by their client (owner) id.
To self-check the admin state of a local client, use BIS_fnc_admin.
Groups:
Multiplayer

Syntax

Syntax:
admin ownerID
Parameters:
ownerID: Number - clientOwner id
Return Value:
Number - admin state of given client:
  • 0 - client is not an admin
  • 1 - client is admin that is voted in
  • 2 - client is admin that is logged in

Examples

Example 1:
private _isLoggedInAdmin = admin 3 == 2;
Example 2:
private _adminState = admin owner unit1;

Additional Information

See also:
serverCommand serverCommandAvailable owner clientOwner remoteExecutedOwner

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note