Jump to content

[4.4R4] UPM Notification


Sheckles
 Share

Recommended Posts

  • 1 month later...
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.

Link to comment
Share on other sites

  • 5 weeks later...
  • 1 month later...

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

 

Link to comment
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.

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

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

i am woundering if some one could help me on how to replace the global hint in this with one that gets sent to the player instead using the upm hint

//VDM Report And ADD
if ((isPlayer _source) && (vehicle _source != _source)) then {
if(_part == "body" && (player getVariable["limit",true]) && (side _source == civilian)) then {
player setVariable ["limit",false];
[_source] spawn {
_driver = _this select 0;
[0,format["%1 just ran over %2!", name _driver, name player]] remoteExec ["life_fnc_broadcast",0];
sleep(10);
player setVariable ["limit",true];
 };
}; 
_damage = getDammage player;
};

 

Link to comment
Share on other sites

25 minutes ago, Aura said:

i am woundering if some one could help me on how to replace the global hint in this with one that gets sent to the player instead using the upm hint

//VDM Report And ADD
if ((isPlayer _source) && (vehicle _source != _source)) then {
if(_part == "body" && (player getVariable["limit",true]) && (side _source == civilian)) then {
player setVariable ["limit",false];
[_source] spawn {
_driver = _this select 0;
[0,format["%1 just ran over %2!", name _driver, name player]] remoteExec ["life_fnc_broadcast",0];
sleep(10);
player setVariable ["limit",true];
 };
}; 
_damage = getDammage player;
};

 

fn_broadcast.sqf aka life_fnc_broadcast is where you'd make that change. You'd replace the hint in there and all calls to it would then be UPM instead of hints.

Link to comment
Share on other sites

im trying to replace this 

[0,format["%1 just ran over %2!", name _driver, name player]] remoteExec ["life_fnc_broadcast",0];

with upm but i dont know how to place the code for the layout of upm instead of changing all broadcasts to upm as i dont want to replace all of them 

Link to comment
Share on other sites

  • 2 years later...

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.