forge/arma/client/addons/notifications/XEH_postInitClient.sqf
2026-05-23 09:23:12 -05:00

17 lines
599 B
Plaintext

#include "script_component.hpp"
[{
EGVAR(locker,VARepository) get "isLoaded";
}, {
("NotificationHudLayer" call BFUNC(rscLayer)) cutRsc ["RscNotifications", "PLAIN"];
call FUNC(openUI);
if (isNil QGVAR(NotificationService)) then { call FUNC(initService); };
}] call CFUNC(waitUntilAndExecute);
[QGVAR(recieveNotification), {
params [["_type", "", [""]], ["_title", "", [""]], ["_content", "", [""]], ["_duration", 4000, [4000]]];
playSound QGVAR(notify);
GVAR(NotificationService) call ["create", [_type, _title, _content, _duration]];
}] call CFUNC(addEventHandler);