getClientStateNumber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2")
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


|arma3
|game1= arma3
|version1= 1.56


|1.56
|gr1= Multiplayer


|gr1 = Multiplayer
|descr= Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
 
 
 
| Returns client state in network game. Works on both, client and dedicated server. The following states are possible:


{{{!}} class{{=}}"wikitable"
{{{!}} class{{=}}"wikitable"
Line 43: Line 40:
{{!}}}
{{!}}}


|s1= [[getClientStateNumber]]


| [[getClientStateNumber]]
|r1= [[Number]] - client state (see table above)
 
| [[Number]] - Client state (see table above)
 
|x1= <code>_state = [[getClientStateNumber]];</code>


|x2= <code>_inGame = [[getClientStateNumber]] > 8;</code>
|x1= <sqf>_state = getClientStateNumber;</sqf>


| [[getClientState]], [[getPlayerUID]]
|x2= <sqf>_inGame = getClientStateNumber > 8;</sqf>


| |MPBEHAVIOUR=  
|seealso= [[getClientState]] [[getPlayerUID]]
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 14:00, 8 November 2023

Hover & click on the images for description

Description

Description:
Returns client state in network game. Works on both, client and dedicated server. The following states are possible:
getClientStateNumber getClientState Description
0 "NONE" No client (or singleplayer)
1 "CREATED" Client is created
2 "CONNECTED" Client is connected to server, message formats are registered
3 "LOGGED IN" Identity is created
4 "MISSION SELECTED" Mission is selected
5 "MISSION ASKED" Server was asked to send / not send mission
6 "ROLE ASSIGNED" Role was assigned (and confirmed)
7 "MISSION RECEIVED" Mission received
8 "GAME LOADED" Island loaded, vehicles received
9 "BRIEFING SHOWN" Briefing was displayed
10 "BRIEFING READ" Ready to play mission
11 "GAME FINISHED" Game was finished
12 "DEBRIEFING READ" Debriefing read, ready to continue with next mission
Groups:
Multiplayer

Syntax

Syntax:
getClientStateNumber
Return Value:
Number - client state (see table above)

Examples

Example 1:
_state = getClientStateNumber;
Example 2:
_inGame = getClientStateNumber > 8;

Additional Information

See also:
getClientState getPlayerUID

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