Jump to content

[4.4R4] UPM Notification


Sheckles
 Share

Recommended Posts

Author: UPM https://www.youtube.com/channel/UC5WtPqhP-uGfSQtsTR5JXmw

Videohttps://www.youtube.com/watch?v=t-LbIl8pjrU

Downloadhttps://mega.nz/#!9eZDnCgD!MozYasACNvXwSB8yjrRe67e9HKuO9ID-d1kgNNwbXrM

Tutorial From (Basically a copy paste):  https://altisdev.com/topic/8439/système-de-notification/2

 

 

Installation

Add at the end of your Functions.hpp

class UPM {
    tag = "UPM";
    class UPM_system {
        file = "UPM";
        class showNotification {};
    };
};

 

In your description.ext the part class RscTitles

Add

#include "UPM\Rsc\RscNotification.hpp"

 

Download then extract the UPM file at the root of your mission.

Settings for it:

_title : STRING | Default Value : "" 

_text : STRING | Default Value : "" 

_stripColor : ARRAY | Default Value : [0.043,0.486,0.769,1] | (OPTIONNAL)

_sound : STRING | Default Value : "additemfailed" | (OPTIONNAL)

 

Basic use

["Title","Content pf message"] call UPM_fnc_showNotification

Advanced use

["Title","Content of message",[0.043,0.486,0.769,1],"mysound"] call UPM_fnc_showNotification

 

 

Example of use

stringtable

[“Information”,localize “STR_NOTF_SendingData”] call UPM_fnc_showNotification;

Format

[“Information”,format ["Hello %1",name player]] call UPM_fnc_showNotification;

  • Like 6
Link to comment
Share on other sites

36 minutes ago, Kaiden said:

Have you done the setup correctly?

I just removed everything to do with UPM but i still get the error so im 100% sure i have done something wrong.

 

edit: somehow fixed it yet i did nothing.

Got the server to run but since im a noob i dont understand how i would turn the old hints into the new ones.

Edited by DanRichman
Link to comment
Share on other sites

1 hour ago, DanRichman said:

I just removed everything to do with UPM but i still get the error so im 100% sure i have done something wrong.

 

edit: somehow fixed it yet i did nothing.

Got the server to run but since im a noob i dont understand how i would turn the old hints into the new ones.

Posted some examples as well as read the other comments in here

Link to comment
Share on other sites

36 minutes ago, imthatguyhere said:

I think you don't understand what the stringtable is and you should read the link you quoted.

so would i change if (_unit == player) exitWith {hint localize "STR_ANOTF_Error";}; to 

if (_unit == player) exitWith {[“Information”,localize "STR_ANOTF_Error"] call UPM_fnc_showNotification;};

 

Edited by DanRichman
Link to comment
Share on other sites

Can someone help me with line 

 

"hint format [localize 'STR_pInAct_GarageExtNOTF',LIFE_SETTINGS(getNumber,'houseGarage_buyPrice')];"

it tried this but it dont work

 

["Information",format [localize "STR_pInAct_GarageExtNOTF",LIFE_SETTINGS(getNumber,'houseGarage_buyPrice')]] call UPM_fnc_showNotification;

 

Link to comment
Share on other sites

On 21.7.2018 at 12:40 AM, xTheRealWebix said:

Can someone help me with line 

 

"hint format [localize 'STR_pInAct_GarageExtNOTF',LIFE_SETTINGS(getNumber,'houseGarage_buyPrice')];"

it tried this but it dont work

 

["Information",format [localize "STR_pInAct_GarageExtNOTF",LIFE_SETTINGS(getNumber,'houseGarage_buyPrice')]] call UPM_fnc_showNotification;

 

You sure you’re not supposed to use life_fnc_showNotification? You said it in a previous comment

Link to comment
Share on other sites

  • 3 weeks later...

Its not working for me :/ i am using 5.0

 

Log :

 

16:40:32 Warning Message: File mpmissions\__cur_mp.Altis\UPM\Rsc\RscNotification.hpp, line 20: .RscStructuredText: Member already defined.
16:40:32 Warning Message: File mpmissions\__cur_mp.Altis\UPM\Rsc\RscNotification.hpp, line 40: .RscText: Member already defined.

 

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.