Jump to content

[PROJECT] Gold Coin based Single Currency & Banking System


Recommended Posts

 

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

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

@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

 

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

.bat

@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

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.

 

 

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

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

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

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

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

 

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

 

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

 

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

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...