onPlayerDisconnected: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[cC]ategory:[sS]cripting [cC]ommands\|[a-z A-Z 0-9_]+\]\]" to "")
m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|")
Line 17: Line 17:
* '''_owner''': (''since Arma 3 v1.49'') [[Number]] - is [[owner]] id of the leaving player. Can be used for kick or ban purposes or just for [[publicVariableClient]].
* '''_owner''': (''since Arma 3 v1.49'') [[Number]] - is [[owner]] id of the leaving player. Can be used for kick or ban purposes or just for [[publicVariableClient]].
* '''_idstr''': (''since Arma 3 v1.95'') [[String]] - same as <tt>_id</tt> but in string format, so could be exactly compared to [[allMapMarkers | user marker]] ids.<br><br>
* '''_idstr''': (''since Arma 3 v1.95'') [[String]] - same as <tt>_id</tt> but in string format, so could be exactly compared to [[allMapMarkers | user marker]] ids.<br><br>
{{Informative|Since '''Arma 3''' ''v1.57'' a stackable version of this EH is available: [[Arma_3:_Event_Handlers/addMissionEventHandler#PlayerDisconnected|PlayerDisconnected]]}}<br>
{{Feature|Informative|Since '''Arma 3''' ''v1.57'' a stackable version of this EH is available: [[Arma_3:_Event_Handlers/addMissionEventHandler#PlayerDisconnected|PlayerDisconnected]]}}<br>
{{Feature|arma3|In order to keep compatibility between official and community content the functions [[BIS_fnc_addStackedEventHandler]] and [[BIS_fnc_removeStackedEventHandler]] should be used instead.}}
{{Feature|arma3|In order to keep compatibility between official and community content the functions [[BIS_fnc_addStackedEventHandler]] and [[BIS_fnc_removeStackedEventHandler]] should be used instead.}}



Revision as of 01:13, 7 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Multiplayer:
In MP onPlayerDisconnected is executed only on the server
Groups:
MultiplayerEvent Handlers

Syntax

Syntax:
Syntax needed
Parameters:
code: String or Code
Return Value:
Return value needed

Examples

Example 1:
onPlayerDisconnected "diag_log [_id, _uid, _name]";
Example 2:
onPlayerDisconnected { if (count allPlayers == 0) then { endMission "END1"; }; };

Additional Information

See also:
See also needed

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
Posted on January 14, 2015 - 19:21 (UTC)
AgentRev
For Arma 3 v1.32 and onward, one might want to consider using instead the HandleDisconnect mission event handler for greater flexibility.