Jump to content

Dan | (ㆆ_ㆆ)

Members
  • Posts

    11
  • Joined

  • Last visited

  • Days Won

    2

Dan | (ㆆ_ㆆ) last won the day on May 13 2020

Dan | (ㆆ_ㆆ) had the most liked content!

About Dan | (ㆆ_ㆆ)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Dan | (ㆆ_ㆆ)'s Achievements

Member

Member (2/6)

3

Reputation

  1. I created my own Notification System a while back but i don't really go on arma anymore so i decided to release it here. The Notification File includes a tutorial on how to use it . Credits to Tankode & Lucian as i used their Notification system as a guide when creating mine i didn't use theirs as the UI is a little outdated in my opinion. Params: 0: Text <STRING> text to display in the notification. Default Value "". 1: NotifType <STRING> Type of notification used to set the colour of the Title. Default Value: success 2: Speed <INTEGER> time in seconds to show a notification. Default Value: 5 Example Uses: ["Welcome to CQC"] call Aquaman_fnc_notification_system; ["Tactical View is Disabled", "warning"] call Aquaman_fnc_notification_system; ["Cant Spawn Vehicle", "error", 50] call Aquaman_fnc_notification_system; Planning On Adding a title for Notifications when i have time 1. Create a new File Inside the core Folder Called fn_notification_system.sqf 2. Paste the Below Code inside the new SQF File /* File: fn_notification_system.sqf Author: Aquaman Description: Notification System. Credit: Since i didn't know how to create my own notification system i used TanKode's and Lucian's Notification System as guidance. TanKode Github: https://github.com/TanKode (Also Used the Same Colours as he did as they looked nice) Lucian Notification System: https://native-network.net/forum/thread/3924-tutorial-de100-benachrichtigungssystem/ My Github: https://github.com/DanyaalA Params: 0: Text <STRING> text to display in the notification. Default Value "". 1: NotifType <STRING> Type of notification used to set the colour of the Title. Default Value: success 2: Speed <INTEGER> time in seconds to show a notification. Default Value: 5 Example Uses: ["Welcome to CQC"] call Aquaman_fnc_notification_system; ["Tactical View is Disabled", "warning"] call Aquaman_fnc_notification_system; ["Cant Spawn Vehicle", "error", 50] call Aquaman_fnc_notification_system; Planning On Adding a title for Notifications when i have time */ params [ ["_text", "",[""] ], ["_notiftype", "success", ["",[],{}]], ["_speed", 5, [5]] ]; if (isDedicated || !hasInterface) exitWith {}; if(isNil "current_notifications") then { current_notifications = []; }; disableSerialization; _display = findDisplay 46; _TitleColour = ""; _alpha = 1; //You can add more case statements for different things. Info is the default value //This is used to get the colour of the notification switch (_notiftype) do { case "info": { _TitleColour = [0.129,0.588,0.953,_alpha]; //Blue }; case "error": { _TitleColour = [0.957,0.263,0.212,_alpha]; //Red }; case "warning": { _TitleColour = [1,0.757,0.027,_alpha]; //Amber (Looks Really Nice i used it for my stats notification) }; case "success": { _TitleColour = [0.298,0.686,0.314,_alpha]; //Green (Default) }; default { _TitleColour = [0.298,0.686,0.314,_alpha]; //Same as success. sets colour back to success if something random is entered. }; }; if (_text isEqualType "") then { _text = parseText _text; }; playSound "HintExpand"; private _Title = _display ctrlCreate ["RscText", -1]; //Creating Title Control and Setting the Position, Width and Height. //[0.8035 * safezoneW + safezoneX, 0.2 * safezoneH + safezoneY, 0.0015 * safezoneW, 0.015* safezoneH]; _Title ctrlSetPosition [0.8035 * safezoneW + safezoneX, 0.2 * safezoneH + safezoneY, 0.002 * safezoneW, 0.015* safezoneH]; _Title ctrlSetBackgroundColor _TitleColour; _Title ctrlSetFade 1; _Title ctrlCommit 0; //ctrlCommit Updates the Changes i made above _Title ctrlSetFade 0; _Title ctrlCommit 0.4; private _Message = _display ctrlCreate ["RscStructuredText", -1]; //Creating Message Control And Setting Text, Height and width. _Message ctrlSetStructuredText _text; _Message ctrlSetPosition [0.805 * safezoneW + safezoneX, 0.2 * safezoneH + safezoneY, 0.185 * safezoneW, 0.015* safezoneH]; _Message ctrlCommit 0; _Message ctrlSetPosition [0.805 * safezoneW + safezoneX, 0.2 * safezoneH + safezoneY, 0.185 * safezoneW, ((ctrlTextHeight _Message)+ (0.005 * safezoneH))]; _Message ctrlCommit 0; //Setting Background Colour and Fade _Message ctrlSetBackgroundColor [0.129,0.129,0.129, 0.9]; _Message ctrlSetFade 1; _Message ctrlCommit 0; _Message ctrlSetFade 0; _Message ctrlCommit 0.4; //Updating Title Height to Match The Text Height _Title ctrlSetPosition [0.8035 * safezoneW + safezoneX, 0.2 * safezoneH + safezoneY, 0.002 * safezoneW, ((ctrlTextHeight _Message)+ (0.005 * safezoneH))]; _Title ctrlCommit 0; //Visualising/Creating The Notification so player can see it on screen. [_Message, _Title, _speed] spawn { disableSerialization; uiSleep (_this select 2); //How long the notification lasts for. private _Message = _this select 0; private _Title = _this select 1; _Message ctrlSetFade 1; _Message ctrlCommit 0.3; _Title ctrlSetFade 1; _Title ctrlCommit 0.3; uiSleep 0.35; ctrlDelete _Message; ctrlDelete _Title; }; //Finding Position of Title and Text private _posMessage = (ctrlPosition (_Message)) select 1; private _posTitle = (ctrlPosition (_Title)) select 1; private _messageHigh = (ctrlPosition (_Message)) select 3; //Check if more than one notification is active. //Ill be honest i didn't know how to do this at all so thanks to TaKonde and Lucian. if (count current_notifications >= 1) then { private _activeNotifications = 0; { private _TitleCtrl = _x select 0; private _MessageCtrl = _x select 1; if (!isNull _TitleCtrl && !isNull _MessageCtrl) then { //Updating Position of Current Notification to be lower _TitleCtrl ctrlSetPosition [0.8035 * safezoneW + safezoneX, (_posTitle + _messageHigh + 1.5 * (0.011 * safezoneH))]; _MessageCtrl ctrlSetPosition [0.805 * safezoneW + safezoneX, (_posMessage + _messageHigh + 1.5 * (0.011 * safezoneH))]; _TitleCtrl ctrlCommit 0.3; _MessageCtrl ctrlCommit 0.3; //Updating Position Variables _posMessage = (_posMessage + _messageHigh + 1.5 * (0.011 * safezoneH)); _posTitle = (_posTitle + _messageHigh + 1.5 * (0.011 * safezoneH)); _messageHigh = (ctrlPosition (_MessageCtrl)) select 3; if (_activeNotifications > 3) then { _TitleCtrl ctrlSetFade 1; _MessageCtrl ctrlSetFade 1; _TitleCtrl ctrlCommit 0.25; _MessageCtrl ctrlCommit 0.25; }; }; _activeNotifications = _activeNotifications + 1; } forEach current_notifications; }; current_notifications = ([[_Title, _Message]] + current_notifications) select {!isNull (_x select 0) && !isNull (_x select 1)}; 3. Open Up Functions.HPP 4. Add This at the end of Functions.hpp class Aquaman { class Aquaman { tag = "Aquaman"; file = "core"; class notification_system {}; }; };
  2. what Market 5.0 is this? The Dynamic one? If possible a link to the thread would be nice and your screenshots do not work.
  3. I know you said you will pull your hair out if I don't use pastebin but it turns out that I have a lot of errors just don't know how I would go on about fixing them. I am going to have to upload the log file because the file is 44K Characters and every single text uploading site doesn't allow over 2 million characters. Now ever since I started my server it has been laggy when I edit so I don't really think it has something to do with what I have added. Now I think it's important to mention that I got the file from the description of this youtube video. https://www.youtube.com/watch?v=yWEHlNpoGrI&t Arma3_x64_2018-03-18_01-20-17.rptNow I have looked at some of the errors pretty much all of them are String STR_MAR_Heroin_Field not found. I don't actually know why I am getting the errors because I have tested most of the things that say dont exist and they work in game.
  4. Not sure what logs i would have to post but ever since i got my server it lags a lot whenever i edit the mission file this has been happening since i started the server. It Could be my PC but every time i edit a different mission file i dont lag and just before i found someone with a different altis life SQM and i got good fps on it. I know its probably my PC but if anybody has anything that could help that would be nice. (Not sure what logs i would have to post i can give me Mission file to anyone that would like to see it.)
  5. I have already looked at this and everything there matches up with what i have.
  6. not sure what is going on but [08:01:28:058646 +00:00] [Thread 16320] extDB3: Config Error: : No such node (.IP) this error comes up in the log for database. Just to note i have ran my server before i added some more scripts and tested the server i would rather find the error instead of having to delete all the scripts. My RPT: https://pastebin.com/17KTeyPZ EXDB3 Log https://pastebin.com/KyMePsuv
×
×
  • Create New...

Important Information

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