Currently I have a lot of false positives threw scripts.txt because users are joining with stackedeventhandlers, e.g. player tags from altis life, because they don't get resetted on joining/leaving a server.
Description
Details
- Legacy ID
- 1449602777
- Severity
- None
- Resolution
- Open
- Reproducibility
- Have Not Tried
- Category
- Scripting
Start a hosted server session, add a "oneachframe" stacked eventhandler, disconnect and rejoin. Run this in console:
hint str (missionNameSpace getVariable ["BIS_stackedEventhandlers_oneachframe" []]);
Currently I'm running this code to reset all stacked eventhandlers on player join/leave:
{
_event = _x;
_namespaceId = "BIS_stackedEventHandlers_";
_namespaceEvent = _namespaceId + _event;
_data = missionNameSpace getVariable [_namespaceEvent, []];
{
private "_itemId"; _itemId = [_x, 0, "", [""]] call BIS_fnc_param; [_itemId,_event] call bis_fnc_removeStackedEventHandler;
} forEach _data;
} forEach ["oneachframe", "onpreloadstarted", "onpreloadfinished", "onmapsingleclick", "onplayerconnected", "onplayerdisconnected"];
Event Timeline
stop using them ... they are garbage anyway
those "stacked EHs" are BS anyway
https://community.bistudio.com/wiki/addMissionEventHandler
onEachFrame => "Draw3D"
onPlayerDisconnected => "HandleDisconnect"
onPlayerConnected => init.sqf if(!isDedicated && hasInterface) then {...}
onpreloadstarted & onpreloadfinished are kinda useless anyway as there is no real need for them
only thing that is still lacking some way of doing different is onMapSingleClick ...