Jump to content

[Outdated] [Release] Single Currency & Banking 1.1


Recommended Posts

 

 

How to use CHILD:999 ? or it big secret?

 

 

 

 

 

How to use CHILD:999 ?

_playerIDzupa = getPlayerUID _playerObj;

_cashMoney = 0;

if(_playerIDzupa != "")then{

_key = format["CHILD:999:SELECT `CashMoney` FROM `character_data` WHERE `PlayerUID` = %1:[0]:",_playerIDzupa];

_result = _key call server_hiveReadWrite;

diag_log format["!!!!!!!!!!!!!!! result money 1 :%1",_result];

_status = _result select 0; // get the status of the result

if (_status == "CustomStreamStart") then { //check if the stream coming from the hive was opened

_val = _result select 1; // get the number of entries that will be coming in the stream

if(_val > 0) then {

_result = _key call server_hiveReadWrite;

diag_log format["!!!!!!!!!!!!!!! result money 2 :%1",_result];

_cashMoney = _result select 0;

};

};

_playerObj setVariable ["cashMoney",_cashMoney,true];

_playerObj setVariable ["cashMoney_CHK",_cashMoney];

};

.RPT

 

 

19:47:30 "!!!!!!!!!!!!!!! result money 1 :["CustomStreamStart",10]"

19:47:30 "!!!!!!!!!!!!!!! result money 2 :[0]"

 

in SQL CashMoney = 777

 

Link to comment
Share on other sites

Zupa, does this rings a bell, hero trader does take money but no car spawned in

 

15:25:47 "EPOCH SERVERTRADE: Player: XXXX (XXXXXXXXXX) bought a Unknown Vehicle in/at Unknown Trader City for <null>x <null>"
15:25:47 Error in expression <urrency = _this select 5;
_qty = _this select 6;
_clientID = owner _player;
_p>
15:25:47 Error position: <select 6;
_clientID = owner _player;
_p>

15:25:47 Error Zero divisor

15:25:47 File z\addons\dayz_server\compile\server_tradeObject.sqf, line 9
15:25:49 "PUBLISH: Attempt 2e251d00# 732840: arrow_down_large_ep1.p3d REMOTE"
15:25:49 "HIVE: WRITE: "CHILD:308:13:GAZ_Vodnik_DZE:0:9:[325,[15580.2,16403.1,0]]:[]:[]:1:15580216403102810:""
15:25:50 "HIVE: WRITE: "CHILD:388:15580216403102810:""
15:25:50 "CUSTOM: Selected "569""
15:25:50 Cannot create entity with abstract type GAZ_Vodnik_DZE (scope = private?)
15:25:50 Cannot create non-ai vehicle GAZ_Vodnik_DZE,

 

I use your trader files from this script...

 

** Edit -  Problem solved the classname of the vodnik was wrong changed it and voila...

Link to comment
Share on other sites

Found the answer:

I mean not playerHud.sqf. My bad. I wanted to see your gold/init.sqf.

 

Are you sure you have these functions in your compiles.sqf? :

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

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

And those files actually exist in the given paths? (Might be different paths for you)

is there a second page of instructions somewhere ?

couldn't find  many  things in the instructions like this part.

in your compiles.sqf? :

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

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

But with searching and error fixing I got it working.. (I THINK)

most is working except atm's are out in taviana water and in woods (I will try to find the coords and change em)

 

has anyone made a taviana banks.sqf ???

Link to comment
Share on other sites

Hi thanks for this script mod thingy

Where can i change name of the coins 

I wanna make it my local  coin name

And where to find the name of the atm(laptop) i wanne change it to a ather item i saw on tavi ?

 

 

Thanks :)

 

All in variables.sqf

Link to comment
Share on other sites

I am adding new atm locations, but I have a few questions...

I see the markers are  in addbankmarkers.sqf rather than the mission.sqm. I have changed the coords  on the current markers, but I have added more atm's. How can I add more markers in the addbankmarkers.sqf

I just dont understand what these numbers are used for

_marker_23 = _this;
_marker_600 = _this;
_marker_1300 = _this;

_marker_0000 = _this;    

 

and whats the "atm3" "atm56"

 

can I just copy and paste 

 

_this = createMarker ["atm3", [10646.148, 17331.301, 0.78398132]];   //////////////////can I just replace "atm3" with "atm5"  ????????????????????????????
_this setMarkerText "BANK ATM";
_this setMarkerType "Dot";
_this setMarkerBrush "Solid";
_marker_1300 = _this;                ///////change this to any number ??????????      _marker_1301 = _this;       _marker_1302 = _this;           _marker_1303 = _this;                ??????????????

also the my newly created atm (Laptop_EP1) locations I cannot get any scroll function on the laptops, and I could on the origional locations

Link to comment
Share on other sites

All in variables.sqf

i found it thanks

ZUPA i think you missed some text in the tutorial

 

//-----------------------------------Currency & Banking Configs ---------------------------------//
CurrencyName = "Zupa Coins"; // name of your currency
DZE_ATM = ["Laptop_EP1"]; // items,objects classnames where u can bank.
LimitOnBank = false; // false = no limits, true = banks are limited on the value below
MaxBankMoney = 500000; // limit on bank for normal players
DonatorListZupa = [""]; // bigger bank PUID
MaxDonatorBankMoney = 1000000; // Bank size donators
 
//-----------------------------------Currency & Banking Configs END ---------------------------------//
You only tell to add this 
DZE_ATM = ["Laptop_EP1"]; // items,objects classnames where u can bank.
 
And not the above   :)
 
And when i use the anthack money gif and take 
i cant use the admin menu anny more
And my atm's dupe :)
THANKS AGAIN FOR THE GREAT MOD
 
 
Realy stupid i forghet // in the script for infistar
 
:)
Link to comment
Share on other sites

getting this error

 

Error in expression <er_fuelauto2 = -1;


player removeAction s_givemoney_dialog;
s_givemoney_dialog =>
  Error position: <s_givemoney_dialog;
s_givemoney_dialog =>
  Error Undefined variable in expression: s_givemoney_dialog
File mpmissions\__CUR_MP.Tavi\Custom\A_Plot_for_Life\Compile\fn_selfActions.sqf, line 1049

this is my added lines per instructions...

player removeAction s_player_fuelauto;
s_player_fuelauto = -1;
player removeAction s_player_fuelauto2;
s_player_fuelauto2 = -1;
//zuppa's gold
player removeAction s_givemoney_dialog;
s_givemoney_dialog = -1;
player removeAction s_bank_dialog;
s_bank_dialog = -1;
player removeAction s_bank_dialog2;
s_bank_dialog2 = -1;
};

 

Link to comment
Share on other sites

Sorry if this has been reported before, but the coin system works perfectly except for one MAJOR problem, everything says <nil>, the bank says <nil> for the coin count aswell as the traders the only thing that doesn't do that is the HUD.I can still buy/deposit but as you can tell this is a problem that i should fix.

Link to comment
Share on other sites

Sorry if this has been reported before, but the coin system works perfectly except for one MAJOR problem, everything says <nil>, the bank says <nil> for the coin count aswell as the traders the only thing that doesn't do that is the HUD.I can still buy/deposit but as you can tell this is a problem that i should fix.

 

Just a note, this is not cus of the script, this is because a user mistake from you.

 

Try going over the tutorial again and upgrade to 2.0 (in another topic)

Link to comment
Share on other sites

Just a note, this is not cus of the script, this is because a user mistake from you.

 

Try going over the tutorial again and upgrade to 2.0 (in another topic)

 

Just a note, this is not cus of the script, this is because a user mistake from you.

 

Try going over the tutorial again and upgrade to 2.0 (in another topic)

Any idea where i might have gone wrong? I have gone over the tutorial many times and have found no errors. Is it because i changed stuff around and put it into 1 central folder instead of scattered in my mission folder? e.g. scripts\gold, scripts\gui. (I have checked all of the file paths of all files so no script errors.

Link to comment
Share on other sites

I'll have another go at it next week, ill post my findings then , probably messed up somewhere lol

Do i have to change the database in any way to use the 999 hive dll? 

 

Hi Zupa,

 

Here are my findings to see if someone can help me out.

 

It crashes because he is looking for the player_data table and mine is called Player_DATA.

Database: [Error] Error 1146 (Table 'shanej.player_data' doesn't exist) in MySQLQuery SQL: 'SELECT `PlayerMorality` FROM `player_data` WHERE `PlayerUID` = '76561198131672854''

 

No problem , i change the table's name to what ever he wants it.

 

The problem is further along he says:

 

Database: [Error] Error 1146 (Table 'shanej.Player_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `PlayerName`, `PlayerSex` FROM `Player_DATA` WHERE `PlayerUID`='76561198131672854''
2014-09-25 01:17:08 HiveExt: [information] Created a new player 76561198131672854 named 'Jay'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `CharacterID`, `Worldspace`, `Inventory`, `Backpack`, TIMESTAMPDIFF(MINUTE,`Datestamp`,`LastLogin`) as `SurvivalTime`, TIMESTAMPDIFF(MINUTE,`LastAte`,NOW()) as `MinsLastAte`, TIMESTAMPDIFF(MINUTE,`LastDrank`,NOW()) as `MinsLastDrank`, `Model` FROM `Character_DATA` WHERE `PlayerUID` = '76561198131672854' AND `Alive` = 1 ORDER BY `CharacterID` DESC LIMIT 1'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `Generation`, `Humanity`, `Model`, `Infected` FROM `Character_DATA` WHERE `PlayerUID` = '76561198131672854' AND `Alive` = 0 ORDER BY `CharacterID` DESC LIMIT 1'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLStmtPrepare SQL: 'INSERT INTO `Character_DATA` (`PlayerUID`, `InstanceID`, `Worldspace`, `Inventory`, `Backpack`, `Medical`, `Generation`, `Datestamp`, `LastLogin`, `LastAte`, `LastDrank`, `Humanity`) VALUES (?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)'

 

So i cant win , if i change to player_data he doesnt crash , but it doesnt recognise the players or has the ability to create new ones.

 

My best guess is , something request player_data at the start but then my server has this table names somewhere and requests the original names...

 

 

Full logs are in this link

https://meocloud.pt/link/d4a90286-9dbb-4296-af52-6466d74e00b8/Dayz/

 

Edit:

 

I created a player_data table with the same content as Player_DATA , it seems to work but , why does he check player_data in the first place if epoch is going to use Player_DATA? Does any useful info is gathered at that point from player_data ? If he actually uses info from that table then i cant keep this very long as new players are set up in the Player_DATA table...

 

Edit 2:

 

When selling or buying it crashes the server for the same reason, the table names dont match. My Character data table is Character_DATA.

 

2014-09-25 02:19:12 Database: [Error] Error 1146 (Table 'shanej.character_data' doesn't exist) in MySQLQuery SQL: 'UPDATE `character_data` SET `HeadshotsZ` = 2994 WHERE `CharacterID` = 346'

Link to comment
Share on other sites

Hi Zupa,

 

Here are my findings to see if someone can help me out.

 

It crashes because he is looking for the player_data table and mine is called Player_DATA.

Database: [Error] Error 1146 (Table 'shanej.player_data' doesn't exist) in MySQLQuery SQL: 'SELECT `PlayerMorality` FROM `player_data` WHERE `PlayerUID` = '76561198131672854''

 

No problem , i change the table's name to what ever he wants it.

 

The problem is further along he says:

 

Database: [Error] Error 1146 (Table 'shanej.Player_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `PlayerName`, `PlayerSex` FROM `Player_DATA` WHERE `PlayerUID`='76561198131672854''
2014-09-25 01:17:08 HiveExt: [information] Created a new player 76561198131672854 named 'Jay'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `CharacterID`, `Worldspace`, `Inventory`, `Backpack`, TIMESTAMPDIFF(MINUTE,`Datestamp`,`LastLogin`) as `SurvivalTime`, TIMESTAMPDIFF(MINUTE,`LastAte`,NOW()) as `MinsLastAte`, TIMESTAMPDIFF(MINUTE,`LastDrank`,NOW()) as `MinsLastDrank`, `Model` FROM `Character_DATA` WHERE `PlayerUID` = '76561198131672854' AND `Alive` = 1 ORDER BY `CharacterID` DESC LIMIT 1'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLQuery SQL: 'SELECT `Generation`, `Humanity`, `Model`, `Infected` FROM `Character_DATA` WHERE `PlayerUID` = '76561198131672854' AND `Alive` = 0 ORDER BY `CharacterID` DESC LIMIT 1'
2014-09-25 01:17:08 Database: [Error] Error 1146 (Table 'shanej.Character_DATA' doesn't exist) in MySQLStmtPrepare SQL: 'INSERT INTO `Character_DATA` (`PlayerUID`, `InstanceID`, `Worldspace`, `Inventory`, `Backpack`, `Medical`, `Generation`, `Datestamp`, `LastLogin`, `LastAte`, `LastDrank`, `Humanity`) VALUES (?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)'

 

So i cant win , if i change to player_data he doesnt crash , but it doesnt recognise the players or has the ability to create new ones.

 

My best guess is , something request player_data at the start but then my server has this table names somewhere and requests the original names...

 

 

Full logs are in this link

https://meocloud.pt/link/d4a90286-9dbb-4296-af52-6466d74e00b8/Dayz/

 

Edit:

 

I created a player_data table with the same content as Player_DATA , it seems to work but , why does he check player_data in the first place if epoch is going to use Player_DATA? Does any useful info is gathered at that point from player_data ? If he actually uses info from that table then i cant keep this very long as new players are set up in the Player_DATA table...

 

Edit 2:

 

When selling or buying it crashes the server for the same reason, the table names dont match. My Character data table is Character_DATA.

 

2014-09-25 02:19:12 Database: [Error] Error 1146 (Table 'shanej.character_data' doesn't exist) in MySQLQuery SQL: 'UPDATE `character_data` SET `HeadshotsZ` = 2994 WHERE `CharacterID` = 346'

Simply go through the script code and change the table names to what is required. character_DATA and player_DATA

Link to comment
Share on other sites

Ok, didnt know it could be that simple, thought some black magic or dark arts where involved :)

 

I found a reference to player_data in the server_playerSetup.sqf file at compile/server_playerSetup.sqf in the server PBO, didnt find any reference elsewhere.

 

In the mission files i found references in the following files 

 

gold/trade_any_bicycle.sqf

gold/trade_any_boat.sqf

gold/trade_any_vehicle.sqf

gold/trade_backpacks.sqf

gold/trade_items.sqf

gold/trade_items_wo_db.sqf

gold/trade_metals.sqf

gold/trade_weapons.sqf

 

I changed all of them.

I'll try to put it to work later tonight and tell you how it went.

 

Thanks for the help.

Link to comment
Share on other sites

quick "maybe" easy question....

I just added  this currency sytem to my server. (still learning)

how do I exchange gold bars for coins ??

I have 10 cases of goldbars what do I do with them now ???

 

I have looked for exchange at traders and I looked for possible smelting at fires. 

 

a player hits some mines and gets gold nuggets... now what ???

 

sorry if this has been answered already, I skimmed trhough tis topic and found no info on it

Link to comment
Share on other sites

The easiest thing to do - just sell gold bars in traders. That's what I did. Briefcase goes for 100k coins, 10oz gold bars 10k, single gold bar 1k and so on.

thankz for that.. im verry new to the coin system. I have not even looked at how to edit traders. not sure if I do it in the database still or wherever...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...