Jump to content

[RELEASE] Check bank account by radio


GaspArt

Recommended Posts

Hello everybody :)
Today I changed gui on my server, disabled infistar debug monitor, then understood, that need to make something nice for Coin System

So i decided to make a script, that allow check bank accout by radio.

Lets start install it!

1. You need maca134's script for Add Right Click Options to the Items
 
 3 variants of script:

1. Check only bank cash by radio:

1.Create sqf file called bankcall and put this code in:

private ["_bankMoney"];

if (dayz_combat == 1) then {
cutText [format["You are in Combat and Can't check your bank account."], "PLAIN DOWN"];
} else {
    _bankMoney = player getVariable["bankMoney",0];
player playActionNow "Medic";
sleep 2;
cutText [format["Dear %1, you have: %2 coins on your bank account. Thank you for using our bank!",name player,_bankMoney], "PLAIN DOWN"];
};

Save it in mission folder.
 
2. Then add this code in extra_rc.hpp 

    class ItemRadio {
class bankcall {
text = "Check bank account";
script = "execVM 'PATH FOR SQF\bankcall.sqf'";
};
};

DONT FORGET TO CHANGE PATH FOR SQF!!

 

 

2. Check cash from your "card" and  bank cash by radio in ONE key:

1.Create sqf file called bankcall and put this code in:

private ["_bankMoney","_cashMoney"];

if (dayz_combat == 1) then {
cutText [format["You are in Combat and Can't check your bank account."], "PLAIN DOWN"];
} else {
    _cashMoney = player getVariable["cashMoney",0];
    _bankMoney = player getVariable["bankMoney",0];
player playActionNow "Medic";
sleep 2;
cutText [format["Dear %1, you have %2 coins on your card and have %3 coins on your bank account. Thank you for using our bank!",name player,_cashMoney,_bankMoney], "PLAIN DOWN"];
};

Save it in mission folder.
 
2. Then add this code in extra_rc.hpp 

    class ItemRadio {
class bankcall {
text = "Check bank account";
script = "execVM 'PATH FOR SQF\bankcall.sqf'";
};
};

DONT FORGET TO CHANGE PATH FOR SQF!!

 

3. Check cash from your "card" and  bank cash by radio in TWO keys:

1.Create sqf file called cashcall and put this code in:

private ["_cashMoney"];

if (dayz_combat == 1) then {
cutText [format["You are in Combat and Can't check your cash."], "PLAIN DOWN"];
} else {
    _bankMoney = player getVariable["cashMoney",0];
player playActionNow "Medic";
sleep 2;
cutText [format["Dear %1, you have: %2 coins on your card!Thank you for using our bank!Thank you for using our bank!",name player,_cashMoney], "PLAIN DOWN"];
};

Save it in mission folder.
 

2. Create sql file called bankcall and put this code in:

private ["_bankMoney"];

if (dayz_combat == 1) then {
cutText [format["You are in Combat and Can't check your bank account."], "PLAIN DOWN"];
} else {
    _bankMoney = player getVariable["bankMoney",0];
player playActionNow "Medic";
sleep 2;
cutText [format["Dear %1, you have: %2 coins on your bank account. Thank you for using our bank!",name player,_bankMoney], "PLAIN DOWN"];
};

3. Then add this code in extra_rc.hpp 

    class ItemRadio {
class cashcall {
text = "Check cash on your card";
script = "execVM 'PATH FOR SQF\cashcall.sqf'";
};
class bankcall {
text = "Check bank account";
script = "execVM 'PATH FOR SQF\bankcall.sqf'";
};
};

DONT FORGET TO CHANGE PATH FOR SQF!!

 
 

Done :3
 
Special thx:
Peterbeer and  Mikeeeyy for fix :33
Zupa for the best script ever (coins) :3
Maca134 for Right click options script :)


Fixes:


10.11.14 - Added 3 variants of scripts using

 


 

Edited by GaspArt
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...