[Include] [INC] pBank |0.2 Released|
#1

pBank [Extensive Banking System]
Details:
  • Unlike most other bank scripts which are in filterscripts and can't really be controlled by the scripter, pBank is inside an include and can be very extensive when used properly. It contains the basic bank functions, then there are special ones such as the loan system. This system is in it's beta mode is more and more features should pop up soon.
Function Info:
  • pBank_CreateBankAccount(Owner[],Balance,AccountPass[])
    Allows you to create a bank account with a starting balance and an account password. The owner can be a gang group, an individual, or a security force. Whatever comes to mind! See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_GetBankBalance(Owner[])
    Lets you get the bank balance of the specified owner. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_SetBankBalance(Owner[],Amount)
    Lets you set the bank balance of the specified owner. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_LoginPlayerToBank(Owner[],AccountPass[])
    Can/Should be used inside a login command. Logins the player to his account. If AccountPass[] does not match with the one that is inside the bank file, then the player can't login. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_DepositMoney(Owner[],Amount)
    The basic deposit function. Let's you deposit money from your pocket to the bank account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_WithdrawMoney(Owner[],Amount)
    The basic withdraw function. Let's you withdraw money from your bank account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_DeleteBankAccount(Owner[])
    Allows you to delete your bank account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_PlayerGetLoan(Player[],Amount)
    Allows you to get a loan from the bank of any amount. That loan is placed in your bank file which you can pay off whenever you want. There is no security on this function on how much you can take from the bank or when you have to pay. That is up to the scripter to decide. I decided to leave the security out so that the scripter can expand his system without the security's limitation. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_PlayerPaymentOnLoan(Player[],PartialPayment)
    Let's you pay any amount to the loan you have on your account. If you owe the bank $100, and you pay $150, the $50 left over is then deposited to your account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_WireTransfer(Sender[],Receiver[],Amount)
    Let's you transfer funds from your account to somebody elses. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_PlayerDisconnect(Player[])
    This function must be used! Place it at the OnPlayerDisconnect callback. If not used, the player won't be logged out, his pocket money won't be saved, and the next person with his same id, will be able to use his account! See Example.pwn inside RAR for an example on how it works and how it is used.
Credits/Notes:
  • Credits to DracoBlue for his dini! I plan on using djSon in the next versions, but only when I get the hang of it.
  • To modify or redistribute you need my permission.
  • If you have a suggestion, please post it. I would love to add more features into this script. Also report any bugs you find. Have trouble? I will be more than happy to help you resolve it, just don't PM me the question!
Download:
See below for 0.2 download.

__________________________________________________ ________________________________________

0.2 Update [pBank]
0.2 Update:
  • Update 0.2 contains a new feature and due to this new feature, is not backwards compatible with pBank 0.1. The new added feature are adjustable interest rates for each account and an adjustable interest interval(default=1hr).
0.2 New Functions:
  • pBank_GameModeInit()
    Without using this function in your OnGameModeInit callback, the interest feature will not work! See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_SetInterestRate(Owner[],Percent)
    Allows you to set the interest rate for a person's bank account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_RemoveInterest(Owner[])
    Removes a set interest rate from a person's bank account. See Example.pwn inside RAR for an example on how it works and how it is used.

  • pBank_SetInterestInterval(time)
    Sets the interval when each interest is deposited into the applicable accounts. Setting to 0 will disable, default is 1 hour. See Example.pwn inside RAR for an example on how it works and how it is used.
0.2 Download:
Reply
#2

Really nice Pixels^!. I will try this for sure!.

I really like your scripts

Cheers,
Web
Reply
#3

I'm not Seif!
Reply
#4

God.. i ALWAYS do the same thing with both of you...

Although i wrote Seif, i wanted to say Pixels^

You both are the best ones around here so i mix up things :P

Sorry

Cheers,
Web
Reply
#5

Damn you.
Reply
#6

Wow, very interesting. What if somone already has a banking system in there script? will it still take effect? or create a huge bug? XD

EDIT: pBank_WireTransfer(Sender[],Receiver[],Amount)

Do the people gotta be online? Cuz if not they can easily send the money to there other account, and get richer bit by bit.
Reply
#7

This is not a filterscript! It is an include! It doesn't automatically run, the scripter that uses the include decides what can happen, when it can happen, and how it can happen.
Reply
#8

Awesome, absolutely awesome. Mind if I change it a bit on a server I'm planning? Of course credits remains completley yours.
Reply
#9

Quote:
Originally Posted by Rome101
Awesome, absolutely awesome. Mind if I change it a bit on a server I'm planning? Of course credits remains completley yours.
Why not.
Reply
#10

thats very nice, gonna maybe use the inc for my gamemode
Reply
#11

I have a suggestion, add adjustable interest to the banks
Reply
#12

This is a great work, this will very helpfull to all, great work.
Reply
#13

Quote:
Originally Posted by Wadabak
I have a suggestion, add adjustable interest to the banks
Very nice. I will add it for 0.2.

Edit: 0.2 Released. Check first post!
Reply
#14

coool very nice indeed :P












RESPECT
Reply
#15

can anyone help me here to script a createbank command?

(i ask it in scripting discussions and they say i ask it here)
Reply
#16

Quote:
Originally Posted by gijs_min
can anyone help me here to script a createbank command?

(i ask it in scripting discussions and they say i ask it here)
Check Example.pwn..


Nice script, I'm gonna use it for sure!

('ve been searching for a good, Easily customisable bank scriptz for yearz!)

Thanks
Reply
#17

can any one help me
i will the bank accounts not in the script files folder
if you think i'm stupid try it
Reply
#18

Oh you came here to double posting too? Just wait for an answer..
Reply
#19

They are saved in scriptfiles folder.
Reply
#20

whenever I include the .inc, it gives me an error

Код:
stock ReturnModeratorCmd(playerid,reqlvl) // By X_Cutter
{
	new remcmd[50]; // This line returns the error
	format(remcmd,sizeof(remcmd),"Only moderators level %d+ can use this command!",reqlvl);
	return SendClientMessage(playerid,Green,remcmd);
}
ERROR:
Код:
[...]\pawno\include\pBank.inc(231) : error 001: expected token: ";", but found "-identifier-"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)