Page MenuHomeFeedback Tracker

onPlayerDisconnected not working AT ALL
Assigned, WishlistPublic

Description

Since one of the last patches the onPlayerDisconnected event does not work ON CLIENTSIDE! serversided it works fine!

tried:

onPlayerDisconnected { [_id, _name, _uid] call compile preProcessFileLineNumbers "core\functions\fn_onPlayerDisconnect.sqf" };

AND

["temp454", "onPlayerDisconnected", { [_id, _name, _uid] call compile preProcessFileLineNumbers "core\functions\fn_onPlayerDisconnect.sqf" }] call BIS_fnc_addStackedEventHandler;

AND

onPlayerDisconnected { diag_log "onPlayerDisconnected"; };

none of those work!

Details

Legacy ID
3857351477
Severity
None
Resolution
Open
Reproducibility
Always
Category
Multiplayer
Steps To Reproduce
  1. create a mission
  2. host a server
  3. logout / press alt+f4

Event Timeline

OneNonlyNova edited Additional Information. (Show Details)
OneNonlyNova set Category to Multiplayer.
OneNonlyNova set Reproducibility to Always.
OneNonlyNova set Severity to None.
OneNonlyNova set Resolution to Open.
OneNonlyNova set Legacy ID to 3857351477.May 7 2016, 6:39 PM
OneNonlyNova edited a custom field.

onPlayerConnected and onPlayerDisconnected are not supposed to work on client side, only server.

oh my god really? i've spend about 6-7 hours of testing...
and it worked before!

someone should update the wiki than at least:

https://community.bistudio.com/wiki/onPlayerDisconnected

yeah it will work on client if client is the host, but on dedicated server it works only on the server.

mp5gosu added a subscriber: mp5gosu.May 7 2016, 6:39 PM

Why would one run this on client? o0

Tajin added a subscriber: Tajin.May 7 2016, 6:39 PM
Tajin added a comment.May 23 2014, 2:54 PM

In case you missed it, it is already documented on the wiki:

Additional Information
Multiplayer:
In MP onPlayerDisconnected is executed only on the server