Jump to content
Deadlesszombie

[4.4R4] UPM Notification

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 5

Share this post


Link to post
Share on other sites

If you want to remote exec the notification so all players can see this use this instead

 ["INSERT TITLE HERE","INSERT TEXT HERE"] remoteExec ["UPM_fnc_showNotification", -2];  

 

Edited by Semprus Gaming
  • Like 2

Share this post


Link to post
Share on other sites
37 minutes ago, DanRichman said:

can this script work on V5? im getting an error

19:27:33 Script UPM not found

 

Have you done the setup correctly?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
5 minutes ago, Deadlesszombie said:

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

i read it but i dont understand it. Like the stringtable thing [“Information”,localize “STR_NOTF_SendingData”] call UPM_fnc_showNotification; i dont understand.

Share this post


Link to post
Share on other sites
36 minutes ago, DanRichman said:

I think its because the script doesnt work on 5.0

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

Share this post


Link to post
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

Share this post


Link to post
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;

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
1 hour ago, AngryHerring ッ ®™ said:

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

depends on where he put the function

Share this post


Link to post
Share on other sites
22 hours ago, AngryHerring ッ ®™ said:

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

Yes i donte want to cunfuse someone that is not the Problem

Share this post


Link to post
Share on other sites

@AngryHerring ッ ®™ Your syntax is off is why bro not to worry i have fixed it. 

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

 

Edited by XaFlaForo
  • Like 1

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×