05.03.2011, 10:00
(
Last edited by Zh3r0; 21/04/2011 at 06:33 PM.
Reason: Update.
)
Banking Systemv1.2
[Deposit, Withdraw, Transfer( Offline, Online ), Delete Account, View Stats
[Deposit, Withdraw, Transfer( Offline, Online ), Delete Account, View Stats
Version: 1.2 - FIXED BUG WHEN PLAYER CAN LOGIN BY JUST PRESSING "LOGIN"
Version: 1.1 - OFFLINE TRANSFER FIXED! PLEASE DOWNLOAD AGAIN!
Consider yourself re-downloading!
Information
This script will help you transfer money to a specified player with the specified amount of money, you can deposit moneys, withdraw them later and transfer moneys to an offline player straight into their account!This system uses Y_INI and SSCANF, easy as hell.
There are 2 methods of transfer.
- Direct Transfer( Active Player )
The player must be connected to the server, however, the money sent trough this method will not be deposited into his account, it will be added to player's current money.
This method is more of a /sendcash <id> <money> command, which is easy to understand.
You need to insert either his name, or his ID.
- Account Transfer( Offline Transfer )
With this method the moneys transfered will be added straight into his account, he can also received the moneys if he is disconnected.
*If the player is connected he will received a message which will notify the player of the transfer, from where it comes, what amount of moneys, and when they were sent
*If the player is NOT connected, then this method will add some variables into his account and on connection, if that variable is true, then he will received the sent amount( It stores from where it came from, which player, when it was sent, and the amount ) you can check the pictures for more information.
The moneys will be allocated straight into player's bank account.
Same for you, the moneys sent will be withdrawed from your bank account!
There is only 1 command! With which you will create an account, login into the account, and access the account.
Screenshots
Instalation
Follow the steps:
- Download the files and put them in /filterscripts.
- Create a new folder in /scriptfiles, and name it bAccounts,(Notice the CAPS bA) here the player's account will be stored.
- Download sscanf v2.0(CLICK) and put it in /plugins ( If the folder doesn't exist, create it )
- Download YSI v1.0(CLICK) and add it in /pawno/include ( JUST COPY PASTE THE FOLDER ITSELF, NOT THE FILES INSIDE! )
- Open server.cfg and add the following
filterscripts bsystem
plugins sscanf - This is it! You done it, enjoy.
Download
FIXED VERSION - PLEASE UPDATE
Solidfiles - Direct
pastebin
Extra
- If you want to modify the location of where the player's account will be stored, change:
pawn Code:
#define FILE_LOCATION "/bAccounts/%s.ini"
%s - It will be transformed into player's name.
.ini - File extenstioni( DON'T CHANGE THE EXTENSION! y_ini WORKS THIS WAY! )
Example
pawn Code:
#define FILE_LOCATION "/Folder1/Folder2/%s.ini"
- If the dialog id interferes with another one from your gamemode, change the following:
pawn Code:
#define BANK 3598
3598 - ID of the dialog
Example
pawn Code:
#define BANK 7999
- If you want or not to save the stats on exit, then change:
pawn Code:
#define SAVE_ON_EXIT true
pawn Code:
#define SAVE_ON_EXIT false
false - Don't save them on disconnect.
However, when a player makes a transfer, or deposits money, or withdraws them, it will automatically save the info into the account, use this if you think some data may be lost.
- If you wan to or not to tell the player that he has or not an account, then change:
pawn Code:
#define TELL_ON_CONNECT true
pawn Code:
#define TELL_ON_CONNECT false
false - Don't tell the player on connect.
For further information, for reporting bugs, or anything related to this system, please post here and i will reply as soon as possible.
Enjoy.