Jump to content

[Release] Transfer Money from ATM


Recommended Posts

What does this script do?

  • Title says it all - transfer currency from your bank to any other online player's bank
  • Takes in account player's bank limit and 'donatorlist' that Zupa made in variables.sqf
  • You can activate this script anywhere you want, just call out it's main file transfer_dialog.sqf

 

 

 

What do I need for this addon?

  • Zupa's + Soul's

 

 

 

Download

 

Download available here! [GitHub]

 

Mirror link available here! [upload.ee]

 

 

 

Screenshots

 

money_transfer_screencap.jpg

 

 

 

Installation

 

  1. Download and extract the files from link provided above
     
  2. UnPbo/extract your mission's .pbo file
     
  3. Copy the transfer folder to: \YourMission\gold\
    So the path should look something like this: \Arma 2 Operation Arrowhead\MPMissions\DayZ_Epoch_11.Chernarus\gold\transfer\

     
  4. Open file description.ext from your mission's root folder

    Add to the bottom of the file:

    // Single Currency money transfer addon by Rocu
    #include "gold\transfer\transfer_dialog.hpp"
    Save & close description.ext
     
  5. Open your custom fn_selfActions.sqf (you should have a custom one because Single Currency's installation requires it)

    Find:

    if (s_bank_dialog2 < 0) then {
    	s_bank_dialog2 = player addAction ["Bank ATM", "gold\bank_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
    };
    Add below:
    if (s_bank_dialog3 < 0) then {
    	s_bank_dialog3 = player addAction ["Transfer Money", "gold\transfer\transfer_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
    };
    
    Find:
    } else {
    	player removeAction s_bank_dialog2;
    	s_bank_dialog2 = -1;
    

    Add below:

    player removeAction s_bank_dialog3;
    s_bank_dialog3 = -1;
    

    Find:

    player removeAction s_bank_dialog;
    s_bank_dialog = -1;
    player removeAction s_bank_dialog2;
    s_bank_dialog2 = -1;
    

    Add below:

    player removeAction s_bank_dialog3;
    s_bank_dialog3 = -1;
    
  6. Re-pack your mission folder

 

Note! When making a transition the script asks for confirmation (see screenshots). If you want to disable that second confirmation window follow these steps:

 

Open transfer_dialog.sqf and change this:

ConfirmTransfer = true;

to this:

ConfirmTransfer = false;

That's it!

 

 

For Infistar's Anti-Hack users, you might need to add this as well:

 

 
Open AHconfig.sqf
 
Find:
_ALLOWED_Dialogs = [-1,106,2200,6900,6901,6902,6903,420420,41144,711194];
 
Add ",8101" at the end so it looks like this:
 
_ALLOWED_Dialogs = [-1,106,2200,6900,6901,6902,6903,420420,41144,711194,8101];

Thanks to Jutka for this!

 

 

 

 

 

Additional notes

 

Technically the transition window can be called from anywhere, as mentioned above. You just need to call the main script transfer_dialog.sqf. For example for those who have 'Online banking' enabled at their safes you can add this there as well. Admins can just activate it from their admin tools, etc etc.

 

And as usual, make back-ups of everything when you apply new scripts. 

Link to comment
Share on other sites

Good job with the script man, but I don't think I'll be using this scripts since it reduces the danger of holding money. But It would be a great concept if you could get it in the Donator section for Single Currency.

 

Yep this would be perfect for PvE servers.  Not so much for PvP haha.  Gotta make people scared to carry lots of coins!

Link to comment
Share on other sites

Good job with the script man, but I don't think I'll be using this scripts since it reduces the danger of holding money. But It would be a great concept if you could get it in the Donator section for Single Currency.

 

U have a chernarus central bank ^^

 

So all money stays in that safezone? ^^ 

 

Besides, if you link this script to only certain places/objects. It's the same danger level as give money.

Link to comment
Share on other sites

I dont see the fuzz about this no danger level 

 

It's clearly linked to the atm stands. Since these are probably in a safezone as your servers anyways. Then it's acactually the same as give money. 

 

Damn, wanted to edit instead of quote

Link to comment
Share on other sites

I dont see the fuzz about this dange level thing.

 

It's clearly linked to the atm stands. Since these are probably in a safezone as your servers anyways. Then it's acactually the same as give money. 

 

Well yeah pretty much. Depends how your server is set up.

 

If one were to use the default bank locations (which aren't in trader cities) and if you were to make a trade with someone you'd first have to travel to the ATM, get the money out, and then meet them in trader city. Meanwhile you're carrying large amounts of currency on the way. But then again you could just meet up in the ATM's safe zone so yeah...

 

I don't think the 'decrease of danger' is too major for this addon to be insufficient. Most players care about the comfort and accessibility more than making the game slightly harder. (Ironically enough, my personal gameplay is the exact opposite)

Link to comment
Share on other sites

I dont see the fuzz about this dange level thing.

 

It's clearly linked to the atm stands. Since these are probably in a safezone as your servers anyways. Then it's acactually the same as give money. 

Oh I thought of something different. I see what you've done with the script now.

A little confused on my end.. :S

Link to comment
Share on other sites

  • 3 weeks later...

This is removing the current bank money from the bank account and replacing it with the amount tranfered

 

EX: I gave my 10k to my friend that had 20k, now he only has 10k

 

The script works fine. Has been on my public server for about 3 weeks now.

At first glance, the problem you described seems like it's trying to set money instead of add, am I right? The part of the code that transfers money looks like this:

_target setVariable["bankMoney",_targetBankBalance + _targetMoney, true];

As you can see there's not much that can go wrong here (bankmoney = bank balance + the amount). So the script is working fine, must be a problem @ your end.

 

My first thoughts are that it can't get the player's current bank balance so it's adding the amount to a number 0. That can be caused by several things:

  • Are you sure your bank's variable name is "bankMoney"?
  • Are you sure you have Soul's V1 HiveExt.dll + all the updated files he included?
  • What happens in the database during all this?

    Try this: check the player's bank balance in DB, then transfer the money, during the transfer check it again and a minute after the transfer check it again. See if the numbers add up.

Link to comment
Share on other sites

  • 2 weeks later...

Hey man getting this error:

 

ErrorMessage: File mpmissions\DayZ_Epoch_16.Panthera2\gold\transfer\transfer_dialog.hpp, line 8: /BankTransferDialog/controlsBackground.BankTransferTitleBackground: Undefined base class 'Life_RscText'

 

Any ideas?

Thanks

 

I think you're missing some GUI classes. This script was made to work with Zupa's original GUI files, if you don't have those it won't work. But you can just copy the missing classes over if you want.

Link to comment
Share on other sites

Finally got back around to workin on this. Turned out the issue wasn't that I was missing classes, but that the classes from your transfer_dialog.hpp were looking for gui items that didnt exsist in my build of SC.

to fix just download the SC files from Zupa and copy the gui folder to your server root.

 

Thanks again mate!

Link to comment
Share on other sites

Finally got back around to workin on this. Turned out the issue wasn't that I was missing classes, but that the classes from your transfer_dialog.hpp were looking for gui items that didnt exsist in my build of SC.

to fix just download the SC files from Zupa and copy the gui folder to your server root.

 

Thanks again mate!

 

Aah okay, good to know. Good thing you got it fixed.

Link to comment
Share on other sites

Having another issue now, the transfer dialog works fine for me, but when any NON admin tries to use it, the dialog pops up and instantly disappears.

 

EDIT: Seems to be an issue related to InfiSTAR... now to figure out how to make them play nice.

 

EDIT FIXED: In the infiSTAR AHconfig.sqf the dialog needs to be added to the _ALLOWED_Dialogs list

 

Thanks again!

Link to comment
Share on other sites

Having another issue now, the transfer dialog works fine for me, but when any NON admin tries to use it, the dialog pops up and instantly disappears.

 

If you're using Infistar AH I belive you have to add the dialog ID to the exceptions or something like that. Not sure but I believe it's something like that. I don't have Infistar's AH myself so I couldn't test it out.

Link to comment
Share on other sites

  • 3 weeks later...

If you're using Infistar AH I belive you have to add the dialog ID to the exceptions or something like that. Not sure but I believe it's something like that. I don't have Infistar's AH myself so I couldn't test it out.

 

Just to confirm that that is indeed what solves the issue with the blinking menu.

To be precise:

 

Open AHconfig.sqf

 

Find:

_ALLOWED_Dialogs = [-1,106,2200,6900,6901,6902,6903,420420,41144,711194];

Add ",8101" at the end so it looks like this:

 

_ALLOWED_Dialogs = [-1,106,2200,6900,6901,6902,6903,420420,41144,711194,8101];
Link to comment
Share on other sites

  • 5 months later...

Hi,

 

i use Single Currency+Bank and the Banker Npc.The Dialog for transfer shows up, but he shows me 0 Zupa Coins to my bank account, but i have some coins to my account !

 

This is my fn_selAction at the bottom :

	_banker = _cursorTarget getVariable["BankerBot",0];

if((_banker == 1) and (player distance _cursorTarget < 3)) then {		
		if (s_bank_dialog9 < 0) then {
			s_bank_dialog9 = player addAction ["Bank Menu", "gold\bank_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
		};
if (s_bank_dialog3 < 0) then {
	s_bank_dialog3 = player addAction ["Transfer Money", "gold\transfer\transfer_dialog.sqf",_cursorTarget, 3, true, true, "", ""];
};		
	} else {		
		player removeAction s_bank_dialog9;
		s_bank_dialog9 = -1;
	};

Any Ideas ?

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
  • Discord

×
×
  • Create New...