Page MenuHomeFeedback Tracker

Stacked EVHs are not resetted when leaving/joining a server
Acknowledged, WishlistPublic


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.


Legacy ID
Have Not Tried
Steps To Reproduce

Start a hosted server session, add a "oneachframe" stacked eventhandler, disconnect and rejoin. Run this in console:
hint str (missionNameSpace getVariable ["BIS_stackedEventhandlers_oneachframe" []]);

Additional Information

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

chris579 edited Additional Information. (Show Details)
chris579 set Category to Scripting.
chris579 set Reproducibility to Have Not Tried.
chris579 set Severity to None.
chris579 set Resolution to Open.
chris579 set Legacy ID to 1449602777.May 8 2016, 12:23 PM
chris579 edited a custom field.
X39 added a subscriber: X39.May 8 2016, 12:23 PM
X39 added a comment.Aug 30 2015, 5:44 PM

stop using them ... they are garbage anyway
those "stacked EHs" are BS anyway
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 ...