Quote
rodneyrw1 wrote:
Ok. And how do i start doing things for the bank?
First of all, what do you want the bank to do..:
1. have account(s)
2. deposit / withdraw money
How many accounts can one person have..?? 1, 2 or 10..?? Start of with one.
If he enters the bank and doesn't have a account let that user know. Then he / she can create
an account and deposit money. When there's money in the bank they can withdraw that.
For the DB table (wlf_bank) you need the rows:
UserID (the user ID of the user playing)
Account (set to zero or one, one being that the user has an account)
Money (the amount of money the user has in the bank)
The same goes for a restaurant for example... Start of small... order food, order drink
pay for food and drink. Later you can add diversity like coffee, soda, cappuccino etc.
How does a person enter and leaves the bank / restaurant (commands...)
You need a couple of tables for commands like when a user is inside the bank.
If user_in_bank = 1 and command = "create account" then
check if account already exists, if so 'error' else create new row in table with userID, account =1, money = 0
else
error("not_in_bank")
Start of with 1 user that can go to the bank and create an account and deposit / withdraw money.
That should be enough for the next couple of days...
Happy writing and thinking..!!