Jump to content

[PROJECT] Gold Coin based Single Currency & Banking System


Recommended Posts

I'll redo the banking area's and trader thingies for namalsk, probably tomorrow eve or this weekend. I'll probably just upgrade the existing trader zones to make it easy for myself :)

Doing the same thing as well.

Link to comment
Share on other sites

To get Give Coins working

Open up fn_selfActions.sqf

Find

//Player Deaths
	if(_typeOfCursorTarget == "Info_Board_EP1") then {
		if (s_player_information < 0) then {
			s_player_information = player addAction [localize "STR_EPOCH_ACTIONS_MURDERS", "\z\addons\dayz_code\actions\list_playerDeaths.sqf",[], 7, false, true, "",""];
		};
	} else {
		player removeAction s_player_information;
		s_player_information = -1;
	};

Below that code add

// Zupa- SC - Give Money
	if (_isMan and _isAlive and !_isZombie and !_isAnimal and !(_traderType in serverTraders)) then {
		if (s_givemoney_dialog < 0) then {
			s_givemoney_dialog = player addAction [format["Give Money to %1", (name _cursorTarget)], "gold\give_player_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
		};
	} else {
		player removeAction s_givemoney_dialog;
		s_givemoney_dialog = -1;
	};
Link to comment
Share on other sites

TO get give money working , put this above the following inyour selfactions:

 

//Fuel Pump

if (_isMan and _isAlive and !_isZombie and !_isAnimal and !(_traderType in serverTraders)) then {
if (s_givemoney_dialog < 0) then {
s_givemoney_dialog = player addAction [format["Give Money to %1", (name _cursorTarget)], "gold\give_player_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_givemoney_dialog;
s_givemoney_dialog = -1;
};
Link to comment
Share on other sites

Getting spammed by this RPT error:

16:53:14   Error Undefined variable in expression: asremixhud_humanity
16:53:14 File mpmissions\__cur_mp.Chernarus\addons\playerhud\playerHud.sqf, line 58
16:53:16 Error in expression < UPTIME</t><br/>",
AsReMixhud_blood,   
AsReMixhud_humanity,
AsReMixhud_headshot>
Link to comment
Share on other sites

Try using this on your playerHud.sqf it will show coins and bank only.

disableSerialization;

// player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud

AsReMixhud_Control = true; // player getVariable["AsReMixhud",true];


while {true} do
{
    1000 cutRsc ["AsReMixhud","PLAIN"];
    _wpui = uiNameSpace getVariable "AsReMixhud";
    _vitals = _wpui displayCtrl 4900;
	
	_thePlayer = player;
	AsReMixhud_headshots 		= _thePlayer getVariable["headShots",0];
        Zupa_bank 		        =  _thePlayer getVariable["bank",0];    


	_vitals ctrlSetStructuredText parseText format ["
		<t size='1'> %1 </t><img size='1' align='right' image='addons\playerhud\icons\dollars.paa'/>   <br/>
		<t size='1'> %2 </t><img size='1' align='right' image='addons\playerhud\icons\equip_safe_CA.paa'/>   <br/>",
	AsReMixhud_headshots,//1
	Zupa_bank//2
	];
	_vitals ctrlCommit 0;
        
    sleep 2;
};
Link to comment
Share on other sites

 

TO get give money working , put this above the following inyour selfactions:

 

//Fuel Pump

if (_isMan and _isAlive and !_isZombie and !_isAnimal and !(_traderType in serverTraders)) then {
if (s_givemoney_dialog < 0) then {
s_givemoney_dialog = player addAction [format["Give Money to %1", (name _cursorTarget)], "gold\give_player_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_givemoney_dialog;
s_givemoney_dialog = -1;
};

 

You need to add "s_givemoney_dialog" to infistar  ALLOWED Actions      */ _dayzActions = in the AHconfig?

Link to comment
Share on other sites

 

Try using this on your playerHud.sqf it will show coins and bank only.

 

But i disabled my debug and I am only using the hud, this is my playerHud.sqf

disableSerialization;

// player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud

AsReMixhud_Control = true; // player getVariable["AsReMixhud",true];


while {true} do
{
    1000 cutRsc ["AsReMixhud","PLAIN"];
    _wpui = uiNameSpace getVariable "AsReMixhud";
    _vitals = _wpui displayCtrl 4900;
    
    _thePlayer = player;
    
    AsReMixhud_zombieKills     = _thePlayer getVariable["zombieKills",0];
    AsReMixhud_headshots         = _thePlayer getVariable["headShots",0];
    AsReMixhud_killsH         = _thePlayer getVariable["humanKills",0];
    Zupa_bank         =  _thePlayer getVariable["bank",0];
    AsReMixhud_killsB         = _thePlayer getVariable["banditKills",0];
    AsReMixhud_humanity         = _thePlayer getVariable["humanity",0];
    AsReMixhud_zombies         = "";
    AsReMixhud_zombiesAlive   = "";
    AsReMixhud_blood            =  "";
    AsReMixhud_pid            = "";
    AsReMixhud_puid            = "";
    AsReMixhud_hmnicon         = "";
    AsReMixhud_fps             = (round diag_fps);
    AsReMixhud_svrname        = "Amnesia";
    
    _stime = 0;
    if(serverTime > 36000)then{_stime = time;}else{_stime = serverTime;};
    _hours = (_stime/60/60);
    _hours = toArray (str _hours);
    _hours resize 1;
    _hours = toString _hours;
    _hours = compile _hours;
    _hours = call  _hours;
    _minutes = floor(_stime/60);
    _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format ['0%1',_minutes2];};
    

    //if(AsReMixhud_humanity >= 5000) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmhero.paa'/>"; };
    //if((AsReMixhud_humanity >= 200) && (AsReMixhud_humanity <= 4999)) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmcivil.paa'/>"; };
//    if(AsReMixhud_humanity <= 199) then { AsReMixhud_hmnicon = "<img size='0.8' image='addons\playerhud\icons\As_hmbandit.paa'/>"; };
    
    _vitals ctrlSetStructuredText parseText format ["
        <t size='0.8' align='right'>[GG] Ghostz Gamerz</t><br/>
        <t size='0.9'> %2 %5 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_humanity.paa'/>  <br/>
        <t size='0.9'> %3 </t><img size='0.8' align='right' image='addons\playerhud\icons\dollars.paa'/>   <br/>
        <t size='0.9'> %14 </t><img size='0.8' align='right' image='addons\playerhud\icons\equip_safe_CA.paa'/>   <br/>
        <t size='0.9'> %10 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_killh.paa'/>  <br/>
        <t size='0.9'> %9 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_killb.paa'/>  <br/>
        <t size='0.9'> %4 </t><img size='0.8' align='right' image='addons\playerhud\icons\As_zkill.paa'/>  <br/>
    <t size='0.8' align='right'>%13 FPS</t><br/>    
    <t size='0.8' align='right'>%11h %12min UPTIME</t><br/>",
    AsReMixhud_blood,   //1
    AsReMixhud_humanity,//2
    AsReMixhud_headshots,//3
    AsReMixhud_zombiekills,//4
    AsReMixhud_hmnicon,//5
    name player,//6
    AsReMixhud_zombiesAlive,//7
    AsReMixhud_zombies,//8
    AsReMixhud_killsB,//9
    AsReMixhud_killsH,//10
    _hours,//11
    _minutes2,//12
    AsReMixhud_fps,//13
    Zupa_bank,//14
    AsReMixhud_svrname//15
    ];
    _vitals ctrlCommit 0;
        
    sleep 2;
};

 

Link to comment
Share on other sites

I'm using

And I think it may be the reason that when a player dies and respawns they loose all the money they had in their bank.

Anyone know why? Or maybe I just fucked something up on the install so I'm going through everything again just in case

when players lose your money because your not using the DLLs 

Link to comment
Share on other sites

when players lose your money because your not using the DLLs 

I am using the DLL's. I went through the process of shutting down all my servers just to add them in to my root and my server folder :D

I'm also using the steam patch if that makes a difference.

Link to comment
Share on other sites

hm alright, also I am getting this in my RPT after installing, would I be the only one, again?

 

19:13:11 Error in expression <urrency =	_this select 5;
_qty =		_this select 6;
_clientID = 	owner _player;
_p>
19:13:11   Error position: <select 6;
_clientID = 	owner _player;
_p>
19:13:11   Error Zero divisor
19:13:11 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
Link to comment
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
×
×
  • Create New...