AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S/CS:GO] CSS Bank (including MySQL support) v1.6.6 (https://forums.alliedmods.net/showthread.php?t=120578)

Miraculix 03-06-2010 09:20

[CS:S/CS:GO] CSS Bank (including MySQL support) v1.6.6
 
8 Attachment(s)
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"

t3rm1nal_s(0ut 03-06-2010 13:05

Re: CSS Bank (including MySQL support)
 
cool

old never worked for me :)

let's try this

Miraculix 03-07-2010 14:03

Re: CSS Bank (including MySQL support)
 
New version available!
I found a big bug in DB storage. New players get the bankmoney from disconnected players. Now it should fixed.

2 new fixes:
* fixed: percentage sign not shown in bank menu info
* fixed: checks whether a player is on a team, did not work properly

gaissi 03-12-2010 09:30

Re: CSS Bank (including MySQL support)
 
Very nice plugin....

Can you add the adminfunction to reset all bankaccounts and the adminfunction to give player money`?

Nice work anyway...

Greetings gaissi

Miraculix 03-12-2010 15:05

Re: CSS Bank (including MySQL support)
 
I've just begun to add a "Admin Bank Menu".

Available things will be:
- add/remove money (same amounts as normal deposit/withdraw)
- set money to a selected amount (seven selectable amounts given by translation file)

But it will still take around two weeks because I hardly find time for it. :(

gaissi 03-12-2010 17:51

Re: CSS Bank (including MySQL support)
 
Thanks for the information.

That's no problem...

BeG 03-13-2010 05:57

Re: CSS Bank (including MySQL support)
 
its works when i use 1 database for 4 or 5 servers?

/it is for external mysql´s too or?

Miraculix 03-13-2010 14:38

Re: CSS Bank (including MySQL support)
 
Yes it should work with MySQL.
I've no chance to test it, but I took the MySQL part from Nican's plugin.

I'm not a SQL expert, but I think one database for more than one server should be no problem. On condition that you use an external MySQL database.

You've to config databases.cfg for every server and write the name to cssbank.cfg. Post your experiences please.

bouncer 03-15-2010 23:09

Re: CSS Bank (including MySQL support)
 
I will install if you create web interface please:)

BeG 03-16-2010 06:30

Re: CSS Bank (including MySQL support)
 
can you explain how i have to setup it to use an external mysql db? with the databases.cfg or? and how is the name for the database i have to set? you have an example??

=) thx


All times are GMT -4. The time now is 10:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.