Jump to content
  • 0

Mobile Banking on a right click option


Th3-Hunter333

Question

Does anyone know if its possible to customize a right click option and add Banking (Zupa coins) to a right click option of for example the radio?

 

Ive been trying to get this to work but cant seem to figure out the right way based on other code around it, im not the best at this lol.

This below is what im trying to utilize to launch the atm anywhere on the map in the click actions script
    ["ItemRadio",localize "STR_ZSC_BANK_TELLER","execVM 'scripts\zsc\atmDialog.sqf';","true"],

Using this code above seems like it will work if i can figure out how to rewrite the current atmDialog.sqf to work like this way.

atmDialog.sqf below

if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;

private ["_typeOf"];

player setVariable["isBusy",true,true];
_typeOf = typeOf cursorTarget;

if !(_typeOf in ZSC_bankObjects || _typeOf in ZSC_bankTraders) exitWith {
    dayz_actionInProgress = false;
    player setVariable["isBusy",false,true];
    format [localize "STR_ZSC_BANKING_NOT_AVAIL",_typeOf] call dayz_rollingMessages;
};

createDialog "atmDialog";
call AtmDialogUpdateAmounts;

waitUntil {!dialog};

dayz_actionInProgress = false;

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Try this

["ItemRadio",localize "STR_ZSC_BANK_TELLER","execVM 'scripts\custom_atmDialog.sqf';","true"],

create new file called : 

custom_atmDialog.sqf

and copie/paste this: 

if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;

player setVariable["isBusy",true,true];

createDialog "atmDialog";
call AtmDialogUpdateAmounts;

waitUntil {!dialog};

dayz_actionInProgress = false
player setVariable["isBusy",false,true];

 

Link to comment
Share on other sites

  • 0
14 hours ago, Reaper5150 said:

Nice work! Is there anyway to give players coins via the right click on ItemRadio?

["ItemRadio","Give Coins","execVM 'Give_Coins.sqf';","true"],

 

private ["_coins","_player_coins"];

_coins = 500;

_player_coins = player getVariable[Z_MoneyVariable,0];
player setVariable[Z_MoneyVariable,(_player_coins + _coins),true];

systemChat format ["You received %1 coins.",_coins];

call player_forceSave;

 

Link to comment
Share on other sites

  • 0

@Mig Since we now have Smartphones in 1.0.7.1 classname (Smartphone_DZE) I was wondering is there anyway we could have the players send other players personal messages like Text Messaging with a notification to the receiving player saying "You have a text"? That would be keep them from spamming side chat and pretty cool 😄 

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

×
×
  • Create New...