Addon Details

Watch - Add Favorite


Does this version work for you?
28
w00ts
w00t!2

ba_bank - Version 2.5.6 BETA

posted on 2006-08-31 12:00:00
by british.assassin


Tags: cash css

Description

------------------------------ Installation: ------------------------------ [list=1][*][url=http://addons.eventscripts.com/addons/download/ba_bank]Download[/url] [*]Unzip it into cstrike/ [*]See section on setting up admins [*]Add: [b]es_load ba_bank[/b] to your autoexec.cfg [*]Restart your server[/list] ------------------------------ Commands: ------------------------------ [list][*][b]!bank[/b] (shows the bank menu) [*][b]!bank deposit [/b] (deposits [i]amount[/i] into the players account. Can type [i]!deposit all[/i] to deposit all cash) [*][b]!bank withdraw [/b] (withdraws [i]amount[/i] from the players account. Can type [i]!withdraw fill[/i] to fill cash reserves) [*][b]!bank transfer [/b] (transfers [i]amount[/i] to [i]userid's[/i] bank account) [*][b]!bank admin[/b] (Shows the admin menu. Admins must be set up appropiately in an auth provider)[/list] ------------------------------ Setting up Admins: ------------------------------ NOTE: These instructions are for people who have not already set up an auth provider on their server. If you have already set one up, just do the steps that are neccessary for you. [u]Using basic_auth[/u] [list=1][*]Open up addons/eventscripts/examples/auth/basic_auth/basic_auth.py [*]Find the following line (it's the top line in def load): [syntax="python"]authlist = es.ServerVar("BASIC_AUTH_ADMIN_LIST", defaultvalue="STEAM_ID_LAN;",description="List of administrators for basic_auth")[/syntax] [*]Add your admins steam id's to the end of the defaultvalue argument. For example: [syntax="python"]authlist = es.ServerVar("BASIC_AUTH_ADMIN_LIST", defaultvalue="STEAM_ID_LAN;STEAM_0:0:1234567;",description="List of administrators for basic_auth")[/syntax] [*]Add [b]es_load examples/auth/basic_auth[/b] to your autoexec.cfg BEFORE the [b]es_load ba_bank[/b] line[/list] [u]Using group_auth[/u] [list=1][*]Add [b]es_load examples/auth/group_auth[/b] to your autoexec.cfg BEFORE the [b]es_load ba_bank[/b] line [*]Add the following your autoexec.cfg after the [b]es_load examples/auth/group_auth[/b], but before the [b]es_load ba_bank[/b] line: [syntax="es"]es gauth group create Admins server_var(AUTHSERVICE_ADMIN) es gauth power create bank_admin server_var(AUTHSERVICE_ADMIN) es gauth power create bank_cash server_var(AUTHSERVICE_ADMIN) es gauth power create bank_clear server_var(AUTHSERVICE_ADMIN) gauth power give bank_admin Admins gauth power give bank_cash Admins gauth power give bank_clear Admins es gauth power create bank_use server_var(AUTHSERVICE_IDENTIFIED) gauth power give bank_use IdentifiedPlayers[/syntax] Then for each of your admins, you must add the following lines: [syntax="es"]gauth user create gauth user join Admins[/syntax][/list] ------------------------------ Configuration: ------------------------------ All configuration for ba_bank now takes place in the [b]config.ini[/b] file, shown below: [syntax="ini"][settings] bank_name = '[BA_BANK]' # Allows you to change the 'name' of the bank that appears on all menus and all messages produced by the script bank_max_balance = 1000000 # Sets the maximum balance of a players bank account, 0 for no limit bank_start_balance = 5000 # Sets the starting balance of new bank accounts bank_max_deposits = 1 # Sets the maximum number of times a player can deposit cash into the bank, 0 for no limit bank_max_withdrawals = 1 # Sets the maximum number of times a player can withdraw cash from the bank, 0 for no limit bank_max_transfers = 1 # Sets the maximum number of times a player can trabsfer cash to another player, 0 for no limit bank_min_deposit = 1000 # Sets the minimum amount a player can deposit bank_allow_autowithdrawal = 1 # Set to 1 to allow autowithdrawal at the beginning of the round bank_pistol_round = 1 # Set to 1 to disable withdrawal of cash during the first round of a map bank_buyzone_disable = 1 # Set to 1 to disable the bank on maps that do not have a buyzone bank_inactive_days = 7 # Sets the number of days an account is inactive for before it can be cleared bank_auto_clear_inactive = 1 # Set to 1 to allow automatic removal of inactive bank accounts bank_interest_allow = 1 # Sets whether or not interest is enabled bank_interest_per_round = 1 # Set to 1 for interest at the start of every round, 0 for interest at the start of every map bank_interest_rate = 1.5 # Percentage of interest #From here on allows you to change the amounts that appear on menus. The bit on the left inside the '' is the bit that will be displayed on the menu, the bit on the right represents the amount that will be used in the transaction. You can have as many entries for each menu as you like. [menus] [[deposit]] '$1,000' = 1000 '$2,000' = 2000 '$4,000' = 4000 '$8,000' = 8000 '$16,000' = 16000 [[withdraw]] '$1,000' = 1000 '$2,000' = 2000 '$4,000' = 4000 '$8,000' = 8000 '$16,000' = 16000 [[transfer]] '$1,000' = 1000 '$5,000' = 5000 '$10,000' = 10000 '$20,000' = 20000 '$30,000' = 30000 '$40,000' = 40000 '$50,000' = 50000 '$75,000' = 75000 '$100,000' = 100000 [[admincash]] '$10,000' = 10000 '$20,000' = 20000 '$30,000' = 30000 '$40,000' = 40000 '$50,000' = 50000 '$75,000' = 75000 '$100,000' = 100000 '$150,000' = 150000 '$200,000' = 200000 [/syntax] As of v2.5, ba_bank is fully multilingual. At the initial release of v2.5, only 2 languages are supported, English and French, but you can add your own translations to the [b]langs.ini[/b] file, shown below: [syntax="ini"][account created] en = "You bank acount has been created" fr = "Votre compte bancaire a été créé" [max deposits] en = "You have exceeded the maximum number of deposits for this round" fr = "Vous avez dépassé le nombre maximum de dépÔts pour ce round" [minimum players] en = "There needs to be a minimum of 1 CT and 1 T to deposit cash" fr = "Il faut au moins 1 CT et 1 T pour déposer de l'argent" [pistol round] en = "No withdrawals allowed during the pistol round" fr = "Aucun retrait n'est autorisé pendant les rounds au pistolet" [max withdrawals] en = "You have exceeded the maximum number of withdrawals for this round" fr = "Vous avez dépassé le nombre maximum de retraits pour ce round" [max transfers] en = "You have exceeded the maximum number of transfers for this round" fr = "Vous avez dépassé le nombre maximum de transferts pour ce round" [deposit] en = "You deposited $$$amount" fr = "Vous avez déposé $$$amount" [minimum deposit] en = "Minimum deposit is $$$amount" fr = "Le montant minimum d'un dépÔt est $$$amount" [no deposit] en = "You do not have $$$amount to deposit!" fr = "Vous n'avez pas $$$amount à déposer!" [withdraw] en = "You withdrew $$$amount" fr = "Vous retirez $$$amount" [no withdraw] en = "You do not have $$$amount to withdraw!" fr = "Vous n'avez pas $$$amount à déposer!" [transfer] en = "You transferred $$$amount to $player" fr = "Vous avez transféré $$$amount à $player" [transfer received] en = "You received $$$amount from $player" fr = "Vous avez reçu $$$amount de $player" [no transfer] en = "You do not have $$$amount to transfer!" fr = "Vous n'avez pas $$$amount à transférer!" [no account] en = "That player has not set up a bank account" fr = "Ce joueur n'a pas initialisé son compte bancaire" [interest] en = "Your account gained $$$amount interest" fr = "Votre compte gagne $$$amount d'intérêt" [autowithdraw on] en = "You have turned autowithdraw ON" fr = "Vous avez passé le retrait automatique à ON" [autowithdraw off] en = "You have turned autowithdraw OFF" fr = "Vous avez passé le retrait automatique à OFF" [autowithdraw disabled] en = "The autowithdraw feature has been disabled" fr = "Le retrait automatique a été désactivé" [main menu] en = "Main Menu" fr = "Menu principal" [menu deposit] en = "Deposit" fr = "DépÔt" [menu withdraw] en = "Withdraw" fr = "Retrait" [menu transfer] en = "Transfer" fr = "Transfert" [menu balance] en = "Query Balance" fr = "Demande de solde" [menu settings] en = "Settings" fr = "Configuration" [menu top] en = "Top 10" fr = "Top 10" [settings menu] en = "Settings Menu" fr = "Menu de configuration" [menu autowithdraw] en = "Autowithdraw" fr = "Retrait automatique" [menu autowithdraw on] en = "Autowithdraw [ON]" fr = "Retrait automatique [ON]" [menu autowithdraw off] en = "Autowithdraw [OFF]" fr = "Retrait automatique [OFF]" [menu autowithdraw disabled] en = "Autowithdraw [DISABLED]" fr = "Retrait automatique [DESACTIVE]" [top menu] en = "Top 10" fr = "Top 10" [admin menu] en = "Admin Menu" fr = "Menu admin" [menu cash] en = "Give Cash" fr = "Donner de l'argent" [menu clear] en = "Clear Inactive Accounts" fr = "Nettoyer les comptes innactifs" [deposit menu] en = "Deposit Menu" fr = "Menu de DépÔt" [menu all] en = "All Cash" fr = "Tout l'argent" [withdraw menu] en = "Withdraw Menu" fr = "Menu de retrait" [menu fill] en = "Fill Cash Reserves" fr = "Remplir les réserves d'argent" [transfer menu] en = "Transfer Menu" fr = "Menu de transfert" [menu entire] en = "Entire Bank Balance" fr = "Solde bancaire complet" [admincash menu] en = "Admin Cash Menu" fr = "Menu admin de gestion de l'argent" [players menu] en = "Player List" fr = "Liste des joueurs" [menu exit] en = "Exit" fr = "Quitter" [balance] en = "You have $$$amount remaining in the bank" fr = "Il vous reste $$$amount en banque" [not authorised] en = "You are not authorised to use this function" fr = "Vous n'êtes pas autorisé à utiliser cette fonction" [inactive deleted] en = "All inactive accounts have been deleted" fr = "Tous les comptes innactifs ont été supprimés" [no player] en = "That player does not exist on the server" fr = "Ce joueur n'existe pas sur le serveur" [not admin] en = "You are not an admin" fr = "Vous n'êtes pas admin" [unknown command] en = "Unknown command" fr = "Commande inconnue" [syntax error] en = "Too few or too many arguments" fr = "Trop ou trop peu d'arguments" [bank disabled] en = "The bank has been disabled because this map has no buyzones" fr = "La banque a été désactivée car cette map n'a pas de zone d'achat" [admin give] en = "An admin has given you $$$amount" fr = "Un admin vous a donné $$$amount" [no userid] en = "You must enter a userid" fr = "Vous devez entrer un userid"[/syntax] The list of languages supported, and their abbreviations are listed below: [list][*]English = en [*]German = de [*]Spanish = es [*]French = fr [*]Italian = it [*]Korean = ko [*]Schinese = zh-cn [*]Tchinese = zh-tw [*]Russian = ru [*]Thai = th [*]Japanese = ja [*]Portuguese = pt [*]Polish = pl [*]Danish = da [*]Dutch = nl [*]Finnish = fi [*]Norwegian = no [*]Swedish = sv[/list] If you do add your own translations, either PM me with a copy of your new langs.ini, or post it in the ba_bank forum thread and I will add it into the official ba_bank langs.ini and give you credit for your work. ------------------------------ Bank Events ------------------------------ Since v2.1, ba_bank fires several custom events. This allow scripters to use these events as any normal events in their scripts and will be able to find out information about any transaction that takes place. Below is a copy of the res file included with the script that shows these events and all event_vars associated with them: [syntax="es"]// Events triggered by ba_bank // No spaces in event names, max length 32 // All strings are case sensitive // total game event byte length must be < 1024 // // valid data key types are: // none : value is not networked // string : a zero terminated string // bool : unsigned int, 1 bit // byte : unsigned int, 8 bit // short : signed int, 16 bit // long : signed int, 32 bit // float : float, 32 bit "ba_bank" { "bank_deposit" { "userid" "short" // player depositing money "amount" "long" // amount of money being deposited } "bank_withdraw" { "userid" "short" // player withdrawing money "amount" "long" // amount of money being withdrawn } "bank_transfer" { "userid" "short" // player transferring money "receiver" "short" // player receiving money "amount" "long" // amount of money being transferred } "bank_admin_cash" { "userid" "short" // admin giving money "receiver" "short" // player receiving money "amount" "long" // amount of money being given } }[/syntax] Here is an example of how you could use these events: ESS: [syntax="es"]event bank_deposit { es_msg Deposit -> Player: event_var(es_username) Amount: event_var(amount) } event bank_withdraw { es_msg Withdraw -> Player: event_var(es_username) Amount event_var(amount) } event bank_transfer { es_xsetinfo receiver_name 0 es_getplayername receiver_name event_var(receiver) es_msg Transfer -> From: event_var(es_username) To: server_var(receiver_name) Amount: event_var(amount) } event bank_admin_cash { es_xsetinfo receiver_name 0 es_getplayername receiver_name event_var(receiver) es_msg Admin: event_var(es_username) Gave: server_var(receiver_name) Amount: event_var(amount) }[/syntax] ESP: [syntax="python"]def bank_deposit(event_var): es.msg('Deposit -> Player: ' + event_var['es_username'] + ' Amount: ' + event_var['amount']) def bank_withdraw(event_var): es.msg('Withdraw -> Player: ' + event_var['es_username'] + ' Amount: ' + event_var['amount']) def bank_transfer(event_var): es.msg('Transfer -> From: ' + event_var['es_username'] + ' To: ' + es.getplayername(event_var['receiver']) + ' Amount: ' + event_var['amount']) def bank_admin_cash(event_var): es.msg('Admin: ' + event_var['es_username'] + ' Gave: ' + es.getplayername(event_var['receiver']) + ' Amount: ' + event_var['amount'])[/syntax] ------------------------------ Special Thanks: ------------------------------ Nicolous - For the French translation GODJonez - For the Finnish translation Guardian - For the Dutch translation smithy - For help with testing unicode support thekiller - For help with testing unicode support

Installation

[list=1][*][url=http://addons.eventscripts.com/addons/download/ba_bank]Download[/url] [*]Unzip it into cstrike/ [*]See section on setting up admins [*]Add: [b]es_load ba_bank[/b] to your autoexec.cfg [*]Restart your server[/list]

Version Notes For 2.5.6 BETA

Updated on: 2008-04-13 08:55:39 EST by british.assassin (View Zip Contents)
Added unicode support (thanks to smithy and thekiller for helping me test this)

( Previous Versions )

Request a new feature