Raised This Month: $51 Target: $400
 12% 

XE_Player_Bank v1.2 beta Script Pack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 06-07-2005 , 04:29   XE_Player_Bank v1.2 beta Script Pack
Reply With Quote #1

XE_Player_Bank v1.2 beta

Short Description:
Quote:
When you are running low on cash, and just can't seem to get any, wouldn't it be nice if you could just ask for some and get it? With this Script Pack it becomes possible!!! Just ask your teammates for some spare change, and a short command later...you have extra cash! Then again, if you aren't too greedy, you can give others cash if they need it!
Functions:
Quote:
Currently, there are only 2 operating functions for this script:
  • 1. The "give command"
    • The syntax for the "give command" is like below:

      Code:
      give <playername / part of playername> <amount>
      As an example, my name in game is XE_ManUp. Therefore, if you wanted to give me money, you would type:

      Code:
      give manup 2000
      Once you type this, it deducts $2,000 from your cash and adds it to my cash. Basically, a swap of money.

      Some things you should know about the "give command":
      • 1. You can only give cash to players that are on your team.
        2. You can not give money to yourself.
        3. You can not give money that you don't have (if you don't have enough).

    2. The "give limit" command.
    • When a player types "give limit" in the player chat area, it will let them know the restrictions the admin has placed on the give command.
ADMIN OPTIONS:

Quote:
Main Admin Options: (located in admin_settings.cfg)

Quote:
You have 3 options to choose from as far as which admin mod you would like to handle the payment system:
  • 1 = Mani
    2 = NemoD
    3 = BeetlesMod
  • xeb_payment_method 1

The next option below allows you to deactivate public messages that both players' cash values have been changed. If this value is set to "1", then all financial transactions will be done in "silent mode." If this value is set to "0", then all financial transactions will be announced to players and cause extra spam. I recommend "1".
  • silent_cash_mode 1

This option turns on/off the functionality of the "give command." If this value is set to "0" instead of "1", then any time a player tries using the "give command," it will not work.

  • allow_give_command 1

"Give" Admin Options: (located in admin_settings_give.cfg)

Quote:
The "give_restriction" variable is used to determine the limitations of the "give command" as set forth by the admin. The restrictions are based on the following:
  • 1 = gives_per_round (the max # of times a player can use the "give command" PER ROUND)
    2 = gives_per_map (the max # of times a player can use the "give command" PER MAP)
    3 = give_cash_limit_map (the max amount of money a player can "give" PER MAP)
  • give_restriction 1

The following 2 values set the minimum/maximum amount of money a player is allowed to give to another player at a time. If the value the player tries giving goes below the "give_command_least_amount" or above the "give_command_greatest_amount" then an error message will be displayed. These values must be set in order for this Script Pack to work properly.

  • give_command_least_amount 100
    give_command_greatest_amount 16000


The following 3 values are VERY IMPORTANT!!! You can only have one enabled at a time. If all of them are enabled, the payment system will execute 2-3 times per one command. To "disable" a value, you must place an "X" next to the variable. DO NOT use a "0"!!!
  • 1. The "gives_per_round" variable sets how many times a player can use the give command per round.

    2. The "gives_per_map" variable sets how many times a player can use the give command per map.

    3. The "give_cash_limit_map" variable sets how much money a player can give to other players per map.

    • gives_per_round 3
      gives_per_map 10
      give_cash_limit_map 16000

The variable "allow_dead_to_give" enables the use of the "give command" whether ot not the player is dead or alive (if the value is set to "1"). If the value is set to "0" and the player tries using the "give command", he/she will be given an error message notifying them that they are unable to use the "give command" while they are dead.

  • allow_dead_to_give 1


The "show_give_msg" variable displays a message reminding the player that they can type "give limit" in the player chat area to see the restrictions that the admin has placed on the "give command." This message is set to occur on round start.

  • show_give_msg 1
Requirements:

Quote:
EventScripts v0.7.7 beta + Any one of the following admin mods:
Special Note:

Quote:
If you have Mani's Admin Mod and have "WAR MODE" enabled, you will have to use another payment system (either NemoD or BeetlesMod). Mani's War Mode disables the ma_givecash and ma_takecash commands, therefore disabling the functionality of the xeb_payment_method variable if set to the value of "1".

If Mani's "War Mode" is enabled you will have to set either:
  • xeb_payment_method 2
    or
    xeb_payment_method 3
Installation:
Quote:
  • 1. Unzip.

    2. Copy the folder XE_Player_Bank (containing the .cfg files) to your eventscripts subdirectory. If no subdirectory has been specified, then it would be copied to the cstrike\cfg folder.

    3. Place the following code into your autoexec.cfg file:
    Code:
    eventscripts_register XE_Player_Bank
    4. Edit the admin_settings.cfg file located in the XE_Player_Bank folder to your liking.

    5. Play away.

If you have troubles with the installation, see the link below:

http://www.sourcemod.net/~sourcemod/...pic.php?t=1468
UPDATES:
Quote:
Quote:
XE_Player_Bank v1.1

1. Modified coding to take less time to process multiple if...then statements; making the script process faster.

2. Split up the contents of admin_settings.cfg between the new "admin_settings_give.cfg" and the old "admin_settings.cfg" for increased functionality.

3. If allow_give_command is set to "0", then a variety of server variables are not longer set up. Before, values were set even if the "allow_give_command" was set to "0". I figured this would save server processing power.

4. Added the give_restriction variable to cut back on errors caused by the admin neglecting to set 2 out of the 3 variables to the value of "x":
  • gives_per_round 3
    gives_per_map 10
    give_cash_limit_map 16000

5. Removed the variables (use_mani use_nemod use_beetle) and replaced them with the variable xeb_payment_method to cut back on errors caused by the admin neglecting to set 2 out of the 3 variables to the value of "x":
  • xeb_payment_method 1
    or
    xeb_payment_method 3
    or
    xeb_payment_method 3

6. Added the silent_cash_mode variable to eliminate the public display of financial transactions (aka "console spam" or "chat spam"). When this value is set to "1" (recommended), then there will be no "public" announcement of the change in either players' cash amounts.

7. Added an "install check" system. If installed incorrectly, then a message will be displayed in the center of the screen saying "

8. Fixed the bug that if the "allow_give_command" were set to "0" then the "show_give_msg" would still be displayed. Now, if the "allow_give_command" is set to "0", then NO MESSAGE is displayed.
XE_Player_Bank installed incorrectly!
"
Quote:
XE_Player_Bank v1.2

1. Fixed the Install Check bug where even if you installed XE_Player_Bank correctly, it would still display an error message.

2. Added coding that if silent_cash_mode is set to "1" (active) then the variables:
  • mani_mute_con_command_spam (Mani)
    nm_show_actions (NemoD)
    ShowChatCommands (BeetlesMod)
would be changed back to their original values IMMEDIATELY after payment has been executed.

I did this in order not to mess with other admins' settings on their server if the script pack is active...(prior to this "update" it would permanently change their settings of these server vars).
If you have anything that you would like to see added, let me know! All suggestions/comments are welcomed! I am planning on adding a decent amount more.
Attached Files
File Type: zip xe_player_bank_v1.2.zip (10.3 KB, 87 views)
XE_ManUp is offline
$carface
Member
Join Date: Mar 2005
Location: Neumarkt
Old 06-07-2005 , 13:33  
Reply With Quote #2

does the plugin still work, when war mode is activated? or do i have just to put allo_give_command 0 into my war.cfg's? ;)
$carface is offline
Send a message via ICQ to $carface
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 06-07-2005 , 14:22   XE_Player_Bank with Mani's WAR MODE
Reply With Quote #3

Quote:
Originally Posted by DieNackteKanone
does the plugin still work, when war mode is activated? or do i have just to put allo_give_command 0 into my war.cfg's?
Well...I've never had any experience with Mani's "War Mode" up until just a few moments ago when I read your post! It seems to completely disable the functionality of the ma_givecash/ma_takecash command (which is what is used to "pay" the players). Unless there is a way that I have not discovered to re-enable the functionality of the ma_givecash/ma_takecash commands during war mode, then it can't be used for war mode.

It seems that the purpose of Mani's "War Mode" is to disable the functionality of any mani command that should not be used for clan matches. I could be wrong, but it makes sense to enable war mode during clan matches so that the admin can not give extra money, health, etc. to his/her teammates during the match therefore giving the admin's team the advantage.

The workaround is to NOT USE mani as the payment method when war mode is enabled. If you have NemoD or BeetlesMod on your server, just use one of those 2 in order to allow the payment system to work. Mani's War Mode only seems to disable his own commands, not that of other admin mods.

I hope this answered your question!!!

(I have added this to the main documentation up above under the section "Special Note.")

DieNackteKanone, if you DO NOT want someone to be able to use the give command, then type the following in the server console prior to each map or add this line to your "war.cfg":

Code:
es_xsetinfo allow_give_command 0
This is only if the allow_give_command variable is set to "1" in the admin_settings.cfg. The server will automatically change this back on each new map, so you will have to make sure that you run the above code at the beginning of each new map (which I assume that the "war.cfg" will be run each new map until the match is over).

I also neglected to update the coding in my round_start.cfg so that if the reminder message is enabled, but the allow_give_command is disabled, the message is still disblayed. This is the code that "should" be in the round_start.cfg.

Code:
if (server_var(allow_give_command) equalto 1) then es_xif (server_var(show_give_msg) equalto 1) then es_msg #green [Notice]: Type GIVE LIMIT in player chat to see the give command restrictions.
If you do not feel like replacing the code above, for add the following to your "war.cfg" as well:

Code:
es_xsetinfo show_give_msg 0
XE_ManUp is offline
$carface
Member
Join Date: Mar 2005
Location: Neumarkt
Old 06-07-2005 , 15:40  
Reply With Quote #4

thanks for your answer, that was all i wanted to know, keep up the good work ;)
__________________
$carface is offline
Send a message via ICQ to $carface
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 06-09-2005 , 00:05  
Reply With Quote #5

XE_Player_Bank v1.1 beta has been released!!!

UPDATES:
Quote:
XE_Player_Bank v1.1

1. Modified coding to take less time to process multiple if...then statements; making the script process faster.

2. Split up the contents of admin_settings.cfg between the new "admin_settings_give.cfg" and the old "admin_settings.cfg" for increased functionality.

3. If allow_give_command is set to "0", then a variety of server variables are not longer set up. Before, values were set even if the "allow_give_command" was set to "0". I figured this would save server processing power.

4. Added the give_restriction variable to cut back on errors caused by the admin neglecting to set 2 out of the 3 variables to the value of "x":
  • gives_per_round 3
    gives_per_map 10
    give_cash_limit_map 16000

5. Removed the variables (use_mani use_nemod use_beetle) and replaced them with the variable xeb_payment_method to cut back on errors caused by the admin neglecting to set 2 out of the 3 variables to the value of "x":
  • xeb_payment_method 1
    or
    xeb_payment_method 3
    or
    xeb_payment_method 3

6. Added the silent_cash_mode variable to eliminate the public display of financial transactions (aka "console spam" or "chat spam"). When this value is set to "1" (recommended), then there will be no "public" announcement of the change in either players' cash amounts.

7. Added an "install check" system. If installed incorrectly, then a message will be displayed in the center of the screen saying "

8. Fixed the bug that if the "allow_give_command" were set to "0" then the "show_give_msg" would still be displayed. Now, if the "allow_give_command" is set to "0", then NO MESSAGE is displayed.
XE_Player_Bank installed incorrectly!
"
XE_ManUp is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 06-09-2005 , 01:13  
Reply With Quote #6

I think you should rename the script to player money trade or something. Since its really not a 'bank' script.
Good idea anyways, I'm yet to try it.
__________________
ichthys is offline
ajax
Veteran Member
Join Date: Jan 2005
Old 06-09-2005 , 01:21  
Reply With Quote #7

i finally got a chance to look at this code. it's one of those things that is very simple in concept but is very complicated under the surface. with that in mind, the amount of admin settings and the amount of functional checks you do is mind boggling. the number of parameters involved is crazy.

one thing you did that i like is breaking the payment configs up by plugin. in the recent update of LastManStanding i slimmed it down to one plugin (mani). there were a few reasons for this, but one of them was because i thought the plugin check and executions were cumbersome. the way you do it, it only does what it needs to do for the plugin being used. i think i might steal that method from you

anyway great idea. one nice aspect is that even though there is a ton of code going on, it only happens when someone actually gives... so lag shouldn't be an issue. i will try it out on my server tomorrow.
ajax is offline
ajax
Veteran Member
Join Date: Jan 2005
Old 06-09-2005 , 01:22  
Reply With Quote #8

Quote:
Originally Posted by ichthys
I think you should rename the script to player money trade or something. Since its really not a 'bank' script.
Good idea anyways, I'm yet to try it.
i agree. call it the SHUTUP ICHY Script Pack.

(btw keep the name... he's probably just working on his own "bank" script)
ajax is offline
XE_ManUp
Senior Member
Join Date: Mar 2005
Location: Charlotte, NC
Old 06-09-2005 , 01:33  
Reply With Quote #9

Quote:
Originally Posted by ichthys
I think you should rename the script to player money trade or something. Since its really not a 'bank' script.
Good idea anyways, I'm yet to try it.
You know, I actually started coding with the intention of a "banking" script. I have thought about changing the name, though. I just had to come up with something for the "beta" release! How about "XE_Trading_Post"

Here's some insight on what I am working on adding:

The "Loan" Command:

This would work like the "give" command, but be for "loaning" members the opposite team cash.

If the player on the opposite team can't get any money from his/her teammates, then he/she "requests" a loan from a member of the opposing team of a certain amount. Currently, the syntax of this command is:

Code:
ask loan manup 5000
Therefore, if you typed this command, a message would appear on my screen saying:

ichthys has requested a loan for $ 5000
Do you accept? <Y/N>


If my answer = "y" then ichthys is "loaned" $5000 from my account. However, with the "loan command" there is a catch. If the loan is not "paid back in full" within "X#" of rounds, then there will be a penalty.

I have not completely come up with a great "penalty system" as of yet (which will be set as multiple options by the admin), but I am working on it. What I have thought of is:
  • 1. The player gets killed and all of the player's money is given to the player that gave the loan.

    2. The player gets killed and loses all of his/her money whilst the player that gave the loan gets all money that was loaned plus a certain % back (interest, so to speak).

Oh yes - and once the player has "requested" a loan he/she must wait "X" amount of time before requesting another loan (admin option).

AND, if the player has "received" a loan, he/she can not get another loan until the loan they have is paid back in full.
XE_ManUp is offline
ajax
Veteran Member
Join Date: Jan 2005
Old 06-09-2005 , 01:41  
Reply With Quote #10

Quote:
If the player on the opposite team can't get any money from his/her teammates, then he/she "requests" a loan from a member of the opposing team of a certain amount.
i can't imagine this would fly on a public server, unless you had a clanmate on the other team.

you could still institute this request system though. with the current setup, a broke player would have to tell a teammate that they needed $$$ and then the teammate would have to initiate the command (i think). if you use a "begging" system, then the onus is on the begger and all the giver has to do is agree.

Quote:
I have not completely come up with a great "penalty system" as of yet
permaban.
ajax is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:58.


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