admin: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.69|= Game version |exec= server...")
 
m (Text replacement - "[[server.cfg#" to "[[Arma 3: Server Config File#")
 
(43 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|version1= 1.70


|1.69|= Game version
|gr1= Multiplayer


|exec= server|=
|serverExec= server
____________________________________________________________________________________________


| 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.
* <tt>1</tt> - client is admin that is voted in
{{Feature|informative|To self-check the admin state of a local client, use [[BIS_fnc_admin]].}}
* <tt>2</tt> - client is admin that is logged in
In all other cases it returns 0.|= Description
____________________________________________________________________________________________


| '''admin''' ownerID |= Syntax
|s1= [[admin]] ownerID


|p1= ownerID: [[Number]] - [[clientOwner]] id |= PARAMETER1
|p1= ownerID: [[Number]] - [[clientOwner]] id


|p2= |= PARAMETER2
|r1= [[Number]] - admin state of given client:
 
|p3= |= PARAMETER3
 
| [[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 [[Arma 3: Server Config File#Voted_In_Admin|voted in]]
* 2 - client is admin that is logged in|= RETURNVALUE
* 2 - client is admin that is [[Arma 3: Server Config File#Logged_In_Admin|logged in]]
 


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


____________________________________________________________________________________________
|x2= <sqf>private _adminState = admin owner unit1;</sqf>


| [[serverCommand]], [[serverCommandAvailable]], [[owner]], [[clientOwner]] |= SEEALSO
|seealso= [[serverCommand]] [[serverCommandAvailable]] [[owner]] [[clientOwner]] [[remoteExecutedOwner]]
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma 3: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]

Latest revision as of 13:40, 17 May 2024

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