View Single Post
Author Message
Miraculix
Senior Member
Join Date: Dec 2009
Location: Germany
Old 03-06-2010 , 09:20   [CS:S/CS:GO] CSS Bank (including MySQL support) v1.6.6
Reply With Quote #1

CSS Bank (including MySQL support) v1.6.6
last update: 2014-05-03

CS:GO:
Since v1.4.5 use the cssbank.smx. Don't worry about CSS in the name. ;-)
Note: Don't forget to delete your csgobank*.smx

Inital Plugin:
SM Bank Mod: MySQL from Nican, mateo10
Fundamental Changes:
  • added new cvars
  • added auto deposit/withdraw
  • added some other features
  • reworked complete code
  • added small webinterface
Description:
A player can deposit money to the bank, transfer it to other players or withdraw when needed.
Also set automatic deposit and/or withdraw.
All cvars can be configured in the cssbank.cfg
Supports MySQL
include small webinterface
Credits:
Nican for his inital plugin: SM Bank Mod: MySQL
graczu for the top10 part in his css_rank plugin
SilentWarrior for gave mightily starting assistance
svito for slovak translation
UncLeMax for Russian translation
away000 for Portuguese translation
TnTSCS for helping with bots in CSGO
Changelog:

Cvarlist:
(default value):

If you load the plugin the first time, a config file (cssbank.cfg) will be generated in the cfg/sourcemod folder.
  • css_bank_enable (1) Turns Bank On/Off
  • css_bank_maximum (250000) Maximum amount of money players are allowed to have in the bank, 0 to disable (max 2,000,000,000)
  • css_bank_announce (1.0) Turns on announcement when a player joins the server, every map or every round: 0.0 = disabled, 1.0 = every map, 2.0 = every round
  • css_bank_deposit_fee (200) Fee, the players must pay for each deposit
  • css_bank_interest (2.5) % of interest players will get per round
  • css_bank_min_deposit (1000) Min. deposit amount, 0 to disable
  • css_bank_pistolrounds (1) Set the number of pistolrounds the bank is disabled, min. 0
  • css_bank_identity (CSS Bank) Set the name of your bank
  • css_bank_min_players (2) The number of min players to activate bank, min 0
  • css_bank_dbconfig (clientprefs) Set the database configuration listed in databases.cfg
  • css_bank_mapmode (0) 0 = Disable bank during listed map prefixes, 1 = disable bank during NON-listed map prefixes (only listed maps enable bank)
  • css_bank_mapprefixes (" ") List the map prefixes where the bank is enabled or disabled. Related to the css_bank_mapmode Cvar
  • css_bank_autodep (0) Default auto deposit for new player
  • css_bank_autowith (0) Default auto withdraw for new player
  • css_bank_adminlimit (0) Maximum amount of money admins are allowed to have in the bank. 0 for no other limit.
  • css_bank_adminflag (d) Set the Admin Flag. For mor information: http://wiki.alliedmods.net/Adding_Ad...eMod%29#Levels. Changes require to reload plugin or restart server!
  • css_bank_resetinterval (0) Set the number of days the bank should reset periodically, 0 for never
  • css_bank_prunedb (0) Set the number of days after inactive players will be deleted, 0 for never
  • css_bank_add_to_adminmenu (1) Turns On/Off the adminmenu entry
  • css_bank_transfer_limit (0) Maximum amount of money players are allowed to transfer. 0 for no limit
  • css_bank_default_bankmoney (0) Default amount of money new players get in the bank
  • css_bank_log_transfers (0) Enables transfer logging. 0 = Disable
  • css_bank_log_transfers (0) Enables admin action logging. 0 = Disable
User Commands: (chat trigger)
bank (!bank or /bank) Display a menu with the Bank functions
deposit (!deposit or /deposit) Display a menu with amounts to deposit
withdraw (!withdraw or /withdraw) Display a menu with amounts to withdraw
bankstatus (!bankstatus or /bankstatus) Prints the current bankstatus to the chat
deposit <all|amount> (!deposit <all|amount> or /deposit <all|amount>) to deposit all or typed amount
withdraw <all|amount> (!withdraw <all|amount> or /withdraw <all|amount>) to withdraw all (max 16000) or typed amount
Admin Commands: (chat trigger)
bankadmin (!bankadmin or /bankadmin) Display a menu with the Bank functions for an admin
Server Commands:
css_bank_reset_all resets the hole bank
css_bank_reset_money resets only money amounts
css_bank_cleanup to clean up database (deletes redundant entries)
Installation:
copy the contents of the "gameserver" package to your gameserver
Update from v1.3.2:
1. backup the cssbank.cfg
2. proceed normal installation
3. merge config changes
4. reload the plugin or change map or restart server
5. execute server command "css_bank_update"
6. and it's better to change map after update to minimize data loss

If you are using mysql, you can instead of point 5 and 6 also run:
"ALTER TABLE `css_bank` ADD `last_accountuse` int(64) NOT NULL;ALTER TABLE `css_bank` ADD `last_bankreset` int(64) NOT NULL;UPDATE `css_bank` SET `last_accountuse` = UNIX_TIMESTAMP();UPDATE `css_bank` SET `last_bankreset` = UNIX_TIMESTAMP();"
in your db.
How to use an external MySQL database:
in the databases.cfg something like that:
Code:
"cssbank"
{
    "driver"  "mysql"
    "host"   "webserverURL"
    "database"  "databasename"
    "user"   "databaseuser"
    "pass"   "dbpassword"
}
in the cssbank.cfg:
Code:
css_bank_dbconfig "cssbank"
Attached Thumbnails
Click image for larger version

Name:	de_dust20000.jpg
Views:	5824
Size:	37.4 KB
ID:	67567   Click image for larger version

Name:	de_dust20001.jpg
Views:	3297
Size:	27.5 KB
ID:	67568   Click image for larger version

Name:	de_dust20002.jpg
Views:	2754
Size:	18.6 KB
ID:	67569  
Attached Files
File Type: zip cssbank-web.zip (7.8 KB, 2679 views)
File Type: zip cssbank-gameserver.zip (64.8 KB, 2904 views)
File Type: smx cssbank.smx (37.3 KB, 1771 views)
__________________
greeetz Miraculix ;-)

Last edited by Miraculix; 05-03-2014 at 07:56. Reason: update to v1.6.6
Miraculix is offline