Jump to content

PiterChannel
 Share

Recommended Posts

Hello guys, today I'm releasing out another notification system but this one is inspired from Arma 3 Project Life's one. It took me like five minutes to create this, so I'm releasing it with installation guide.

Create "fn_notificationSystem_new.sqf" in "core\functions" and add in the file you just created this code:

/*
Author: PiterChannel
Description: Activates the notification system
Syntax:
1)	[colour,"Welcome"] spawn life_fnc_notificationSystem_new;
2)	
_msg = format ["Welcome %1", name player];
[colour,_msg] spawn life_fnc_notificationSystem_new;
*/

params ["_colore","_messaggio"];
messaggi_utente = [[_colore,_messaggio]] + messaggi_utente; 
_title = "<t align = 'center' shadow = '1' size='1.1' font='PuristaBold'>Altis Life<br />Notification System</t>";  
_final = ""; 
if (numero_messaggi_utente > 4) then { 
	messaggi_utente deleteAt 5; 
	numero_messaggi_utente = numero_messaggi_utente - 1; 
}; 
{ 
_final = format["<br /><br /><t align='center' font='PuristaBold' color='%1'>%2</t>", (_x select 0), (_x select 1)] + _final; 
numero_messaggi_utente = numero_messaggi_utente + 1; 
} forEach messaggi_utente; 
hint parseText (_title + _final);

In the root folder of the mission, in the file "Functions.hpp" add "class notificationSystem_new {};" under this line "file = " core\functions"; "

In the init.sqf add:

numero_messaggi_utente = 0;
messaggi_utente = [];
Yellow = '#E1BB00';
White = '#ffffff';
Red = '#FD1703';
Green = '#17ED00';
Blue = '#001cf0';
Orange = '#ff9d00';

Enjoy!

Remember: when using the notification system, call the function like this: [Yellow,"Message"] spawn life_fnc_notificationSystem_new; and not like this ["Yellow","Message"] spawn life_fnc_notificationSystem_new;

Link to comment
Share on other sites

13 hours ago, Sir Custard Of Cream said:

Thanks for the release, do you have a preview of it ingame?

Here you go:
https://i.gyazo.com/d1377d8d815dc5f4c6984598fa9179d0.mp4
 

I have gone ahead and changed/improved it: https://paste.fini.dev/uvoy.cs


Instead of adding all that stuff above to your init.sqf just add the following line to your configuration.sqf:
 

Message_Notification = [];

 

Edited by Kaiden
  • Like 1
Link to comment
Share on other sites

On 3/26/2020 at 2:39 PM, Kaiden said:

Here you go:
https://i.gyazo.com/d1377d8d815dc5f4c6984598fa9179d0.mp4
 

I have gone ahead and changed/improved it: https://paste.fini.dev/uvoy.cs


Instead of adding all that stuff above to your init.sqf just add the following line to your configuration.sqf:
 

Message_Notification = [];

 

Thank you very much for the improvements sir

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.