Jump to content
Deadlesszombie

[4.4R4] UPM Notification

Recommended Posts

On 8/27/2018 at 8:14 AM, Madco said:

hi, you could also rewrite that several messages are visible. possibly 4, each visible for 15 seconds...

You could probably edit it in the code and add another parameter for it

Share this post


Link to post
Share on other sites

hi thats system works great^^ but i need help to change thies

 

[[0,1],"STR_GNOTF_CaptureSuccess",true,[name player,_ownGroup getVariable "gang_name"]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
 

Share this post


Link to post
Share on other sites
On 10/13/2018 at 10:10 PM, leolam07 said:

hi thats system works great^^ but i need help to change thies

 

[[0,1],"STR_GNOTF_CaptureSuccess",true,[name player,_ownGroup getVariable "gang_name"]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
 

https://github.com/AsYetUntitled/Framework/blob/master/Altis_Life.Altis/core/functions/network/fn_broadcast.sqf

That is the file that handles that. You would swap the hints in there.

Share this post


Link to post
Share on other sites

I'm on 5.0 and trying to make the upm popup in actions 

titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];

I tried this 

["Information",format[localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText]] call UPM_fnc_showNotification;
On 8/18/2018 at 8:45 PM, XaFlaForo said:

@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;

 

didn't work.

Edited by Daniel Stewart
  • Haha 1

Share this post


Link to post
Share on other sites
On 12/22/2018 at 4:15 AM, imthatguyhere said:

Did you get any errors when you tried that?

yea 

Error in expression < SOCK_fnc_updatePartial;

["Information",format[localize "STR_NOTF_B_1", loca>
  Error position: <,format[localize "STR_NOTF_B_1", loca>
  Error Missing ]
File core\actions\fn_buyLicense.sqf [life_fnc_buyLicense], line 78
Error in expression < SOCK_fnc_updatePartial;

["Information",format[localize "STR_NOTF_B_1", loca>
  Error position: <,format[localize "STR_NOTF_B_1", loca>
  Error Missing ]
File core\actions\fn_buyLicense.sqf [life_fnc_buyLicense], line 78

 

Share this post


Link to post
Share on other sites
On 12/23/2018 at 3:30 AM, Daniel Stewart said:

yea 

You have an error in that file then, it seems to be quoting a missing "]", but it could also be an invalid character before the closing "]" of that array.

Share this post


Link to post
Share on other sites
20 hours ago, imthatguyhere said:

You have an error in that file then, it seems to be quoting a missing "]", but it could also be an invalid character before the closing "]" of that array.

I can see that but I have tried messing around with it and can't seem to fix it I have done it for the one above it.

#include "..\..\script_macros.hpp"
/*
    File: fn_buyLicense.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Called when purchasing a license. May need to be revised.
*/
private ["_type","_varName","_displayName","_sideFlag","_price"];
_type = _this select 3;

if (!isClass (missionConfigFile >> "Licenses" >> _type)) exitWith {}; //Bad entry?
_displayName = M_CONFIG(getText,"Licenses",_type,"displayName");
_price = M_CONFIG(getNumber,"Licenses",_type,"price");
_sideFlag = M_CONFIG(getText,"Licenses",_type,"side");
_varName = LICENSE_VARNAME(_type,_sideFlag);

if (CASH < _price) exitWith ["Information",format  [localize "STR_NOTF_NE_1",[_price] call life_fnc_numberText,localize _displayName]] call UPM_fnc_showNotification;
CASH = CASH - _price;

[0] call SOCK_fnc_updatePartial;

titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];
missionNamespace setVariable [_varName,true];

[2] call SOCK_fnc_updatePartial;

that works.

but I can't get the bottom one to work.

Share this post


Link to post
Share on other sites
1 hour ago, Daniel Stewart said:

I can see that but I have tried messing around with it and can't seem to fix it I have done it for the one above it.

#include "..\..\script_macros.hpp"
/*
    File: fn_buyLicense.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Called when purchasing a license. May need to be revised.
*/
private ["_type","_varName","_displayName","_sideFlag","_price"];
_type = _this select 3;

if (!isClass (missionConfigFile >> "Licenses" >> _type)) exitWith {}; //Bad entry?
_displayName = M_CONFIG(getText,"Licenses",_type,"displayName");
_price = M_CONFIG(getNumber,"Licenses",_type,"price");
_sideFlag = M_CONFIG(getText,"Licenses",_type,"side");
_varName = LICENSE_VARNAME(_type,_sideFlag);

if (CASH < _price) exitWith ["Information",format  [localize "STR_NOTF_NE_1",[_price] call life_fnc_numberText,localize _displayName]] call UPM_fnc_showNotification;
CASH = CASH - _price;

[0] call SOCK_fnc_updatePartial;

titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];
missionNamespace setVariable [_varName,true];

[2] call SOCK_fnc_updatePartial;

that works.

but I can't get the bottom one to work.

Remove TitleText

Edit: NVM read it wrong

Edited by Deadlesszombie

Share this post


Link to post
Share on other sites
6 hours ago, Daniel Stewart said:

I can see that but I have tried messing around with it and can't seem to fix it I have done it for the one above it.

that works.

but I can't get the bottom one to work.

You are missing the "{}" of your exitWith it seems.

Share this post


Link to post
Share on other sites
On 12/29/2018 at 2:29 AM, imthatguyhere said:

You are missing the "{}" of your exitWith it seems.

? this is the script

#include "..\..\script_macros.hpp"
/*
    File: fn_buyLicense.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Called when purchasing a license. May need to be revised.
*/
private ["_type","_varName","_displayName","_sideFlag","_price"];
_type = _this select 3;

if (!isClass (missionConfigFile >> "Licenses" >> _type)) exitWith {}; //Bad entry?
_displayName = M_CONFIG(getText,"Licenses",_type,"displayName");
_price = M_CONFIG(getNumber,"Licenses",_type,"price");
_sideFlag = M_CONFIG(getText,"Licenses",_type,"side");
_varName = LICENSE_VARNAME(_type,_sideFlag);

if (CASH < _price) exitWith {hint format [localize "STR_NOTF_NE_1",[_price] call life_fnc_numberText,localize _displayName];};
CASH = CASH - _price;

[0] call SOCK_fnc_updatePartial;

titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];
missionNamespace setVariable [_varName,true];

[2] call SOCK_fnc_updatePartial;

and I want to change both

if (CASH < _price) exitWith {hint format [localize "STR_NOTF_NE_1",[_price] call life_fnc_numberText,localize _displayName];};
CASH = CASH - _price;
titleText[format [localize "STR_NOTF_B_1", localize _displayName,[_price] call life_fnc_numberText],"PLAIN"];
missionNamespace setVariable [_varName,true];

the it to the upm notification 

Share this post


Link to post
Share on other sites
On 12/29/2018 at 2:29 AM, imthatguyhere said:

You are missing the "{}" of your exitWith it seems.

Don't worry I will just use upm for admin messages thank you anyways.

Edited by Daniel Stewart

Share this post


Link to post
Share on other sites
25 minutes ago, Daniel Stewart said:

Don't worry I will just use upm for admin messages thank you anyways.

Your previous posted script had the ExitWith Wrong, the most recent has it fixed

  • Thanks 1

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

×