View Single Post
  #2  
Old 10-09-2009, 01:32 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Consider doing the following for balance:

NPC Code:

SELECT money
FROM bank
WHERE account = player.account



And use the same where clause in your other select queries, instead of cycling through an array every time.

As well as adding functions for each feature (Depositing, Withdrawing, Balance), so it's at least re-usable instead of keeping it nested in the onPlayerChats function.

Other than that, good work.
__________________
Quote:
Reply With Quote