Jump to content

[PROJECT] Gold Coin based Single Currency & Banking System


Recommended Posts

  On 7/31/2014 at 8:59 AM, dayzlauncher said:

 

Number Formating:

BIS_fnc_numberDigits = {
    private ["_number","_step","_stepLocal","_result","_numberLocal","_add"];
    _number = [_this,0,0,[0]] call bis_fnc_param;
 
    if (_number < 10) then {
        [_number]
    } else {
 
        _step = 10;
        _stepLocal = _step;
        _result = [0];
        _add = false;
 
        while {_stepLocal < (_number * _step)} do {
 
            _numberLocal = _number % (_stepLocal);
            {
                _numberLocal = _numberLocal - _x;
            } foreach _result;
            _numberLocal = floor (_numberLocal / _stepLocal * _step);
 
            if (_numberLocal < 0) then {_numberLocal = 9};
            _result = [_numberLocal] + _result;
            _stepLocal = _stepLocal * (_step);
        };
        if ((_result select 0) == 0) then {_result = [1] + _result;};
        _result resize (count _result - 1);
        _result
    };
};
 
BIS_fnc_numberText = {
    private ["_number","_mod","_digots","_digitsCount","_modBase","_numberText"];
 
    _number = [_this,0,0,[0, ""]] call bis_fnc_param;
    _mod = [_this,1,3,[0]] call bis_fnc_param;
 
    if (typeName _number == "STRING") then {
        _number = parseNumber _number;
    };
 
    _digits = _number call BIS_fnc_numberDigits;
    _digitsCount = count _digits - 1;
 
    _modBase = _digitsCount % _mod;
    _numberText = "";
    {
        _numberText = _numberText + str _x;
        if ((_foreachindex - _modBase) % (_mod) == 0 && _foreachindex != _digitsCount) then {_numberText = _numberText + ",";};
    } foreach _digits;
    _numberText
};
 
// Usage:
// [10000] call BIS_fnc_numberText returns 10,000

 

 

Awesome :D

 

So how would i go about adding that?

Link to comment
Share on other sites

  On 7/31/2014 at 8:08 AM, Zupa said:

Whats the content of the bat file u use to launch the server?

 

+ Can u provide the folder structure of your server. ( Screenshot will suffice)

http://puu.sh/ayTZD/e5523dffc1.png

.bat

  Reveal hidden contents
@echo off
start "arma2" /min "arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZOverwatch;@DayZ_Epoch;@DayZ_Server;"

I've tried with Overpoch and vanilla Epoch.

Link to comment
Share on other sites

  On 7/31/2014 at 1:27 PM, Turtle II said:

I'm using the system for namalsk except for the fact that I need to make banks on my own. I will be making them tonight after work so when I do I can send you them.

Will be working late tonight so if you'd please I'd be rather grateful!

Link to comment
Share on other sites

  On 7/31/2014 at 3:17 PM, bFe said:

 

http://puu.sh/ayTZD/e5523dffc1.png

.bat

  Reveal hidden contents
@echo off
start "arma2" /min "arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZOverwatch;@DayZ_Epoch;@DayZ_Server;"

I've tried with Overpoch and vanilla Epoch.

 

 

Your overwatch folder is called different then in the -mod=

Link to comment
Share on other sites

  On 7/31/2014 at 9:11 AM, kylebeed said:

Awesome :D

 

So how would i go about adding that?

Put each of those codes in a new file.

Name the first one: numberDigits.sqf

Name the second one: numberText.sqf

 

Put them in your custom folder

Add these to your compiles above the dedicated part.

BIS_fnc_numberDigits 	= compile preprocessFileLineNumbers "custom\numberDigits.sqf";
BIS_fnc_numberText 	= compile preprocessFileLineNumbers "custom\numberText.sqf";

Next add this to most of the numbers that you want the comma

call BIS_fnc_numberText

I'll try and do most of it and post my files here.

 

 
  On 7/31/2014 at 3:58 PM, CMDR. Taco said:

Has anyone tried this with the Plot Pole for life 2.2.4 mod? if so, what is required to pay the plot pole with coins?

Haven't tested it with it yet.
But most likely it will only take gold bars.
Link to comment
Share on other sites

  On 7/31/2014 at 5:46 PM, Storm said:

Players are able to dupe the coins by disconnecting and it will add the same amount of coins twice to the what you already have on you.

 

Not on my server :\ works fine

Link to comment
Share on other sites

  On 7/31/2014 at 6:10 PM, Jun1997 said:

nope not our server works fine

My bad, I figured it out.

Right after you bank withdrawn coins disconnect and it will dupe the coins.

I tested it both ways, if you wait a bit after taking out the coins it wont dupe the coins.

Link to comment
Share on other sites

  On 7/31/2014 at 6:37 PM, Storm said:

My bad, I figured it out.

Right after you bank withdrawn coins disconnect and it will dupe the coins.

I tested it both ways, if you wait a bit after taking out the coins it wont dupe the coins.

 

Tried disconnecting right after withdrawing. Still working good

Link to comment
Share on other sites

  On 7/31/2014 at 7:45 PM, insertcoins said:

for some reason, on my local test server, I get stuck on waiting for host, and my rtp tells me server error player without identity

Same here. Set up 3 different servers and all the same error: Wait for Host---player without identity,

Link to comment
Share on other sites

  On 7/31/2014 at 3:52 PM, insertcoins said:

Will be working late tonight so if you'd please I'd be rather grateful!

Hey also have you had any problems with clothing since adding the coin system, Players are unable to change clothing now o.O

EDIT: nevermind I got it

Link to comment
Share on other sites

  On 7/31/2014 at 4:25 PM, Zupa said:

Your overwatch folder is called different then in the -mod=

The capitalization in the server startup mod parameters doesn't matter, windows generically treats all capitalization as lowercase anyway, it just visually capitalizes things for you if you have OCD like me :P

Link to comment
Share on other sites

I can assure you guys the system works. You just need to follow the directions correctly :D

 

  On 7/31/2014 at 11:44 PM, therisingdead said:

I can't trade with any traders now, no scroll options

 

  On 7/31/2014 at 7:57 PM, Rc_Robio said:

Same here. Set up 3 different servers and all the same error: Wait for Host---player without identity,

 

  On 7/31/2014 at 7:45 PM, insertcoins said:

for some reason, on my local test server, I get stuck on waiting for host, and my rtp tells me server error player without identity

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...