mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 15:33:29 +00:00
added notify function for DRY
This commit is contained in:
19
addons/main/functions/fnc_notify.sqf
Normal file
19
addons/main/functions/fnc_notify.sqf
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
params ["_message", "_type", ["_title", "ARMATAK"]];
|
||||
|
||||
switch (_type) do {
|
||||
case "success": {
|
||||
_warning = format ["<t color='#00FF21'>%1</t><br/> %2", _title, _message];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
};
|
||||
case "warning": {
|
||||
_warning = format ["<t color='#ffff16'>%1</t><br/> %2", _title, _message];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
};
|
||||
case "error": {
|
||||
_warning = format ["<t color='#FF0021'>%1</t><br/> %2", _title, _message];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
};
|
||||
default { };
|
||||
};
|
||||
Reference in New Issue
Block a user