View Single Post
Author Message
|GsX| GrimReaper
Senior Member
Join Date: Sep 2008
Old 02-17-2009 , 19:39   TeamBets 2.6 (Mani Conversion)
Reply With Quote #1

TeamBets
Version 2.6

By: UPDATED by GrimReaper - Original by ferret! ***REPOSTED due to original author abandoning the project.***
Thanks: Mani for original idea

Requirements

Metamod: Source
Sourcemod

*Notes*
It works with both older MM and SM versions, as well as the latest MM and SM versions.

The automatic web compiler below uses the SM 1.3 compiler.

To use this plugin with an older SM 1.x.x install, grab the teambets.sp file (Get Source link) only and place in the ../cstrike/addons/sourcemod/scripting folder.
Then drag it onto compiler.exe and it will compile against whatever version you have installed.
The resulting teambets.smx file will be located in the ../cstrike/addons/sourcemod/scripting/compiled folder.
Put that in the plugins folder and restart server.
This can be done on your home PC without actuall running a server. Unzip the full SM download and follow the directions above.

When you install for the first time, it will create a config file in ../cstrike/cfg/sourcemod folder called teambets.cfg.
If you are updating from an older version, make sure to setup your config.cfg file and don't put any of the cvars in any other config files.

Description

This plugin allows players to bet on which team will win the round. Their winnings are based on how many players on each team is still alive. Bomb defusals and hostages rescues, etc, count as well.

Players bet by saying "bet team amount". Team must be T or CT. Amount can be either an actual number, or the words all, half, or third.

Examples:
bet t all
bet t half
bet t 3000




Cvars
  • sm_bet
    • Turns the bet plugin on and off
    • Default is on. Set to 0 to disable.
  • sm_bet_deadonly
    • Sets whether or not living players can bet.
    • Default is on. Set to 0 to disable.
  • sm_bet_announce
    • Announces when the teams are 1v1. Does not occur if sm_bet_onevsmany is on.
    • Default is off. Set to 1 to enable.
  • sm_bet_onevsmany
    • Sets whether or not a player is rewarded the "Losing Bets" when its One vs Many. For example, if there are 2 players on each team, and one dies, it's now 1v2. A message will be displayed stating to place your bets. If the 1 player beats the 2 players, they will be rewarded with all the money lost from players who bet on the 2 players. This only counts bets that occured after 1v2 began, not before.
    • Default is 0 or "disabled". Set to 2 or higher to enable.
  • sm_bet_planted
    • Prevents a player from betting after the bomb has been planted.
    • Default is 0 or "disabled". Set to 1 to prevent betting after the bomb is planted.
Change Log:
  • Version 2.6 (Aug 1, 2010)
    • Added a cvar complete with config options and language translation to block betting after the bomb has been planted.
  • Version 2.5 (July 24, 2010)
    • Fixed ability to bet while not on a team or while spectating.
    • Added necessary language file entries and translated all versions thanks to Google Translate, so hopefully it makes sense.
    • THANKS again to Bacardi and Snake60 for actually fixing the code. I just fixed what line it belonged on and updated the front page here.
  • Version 2.4 (July 2, 2010)
    • Fixed typo where I had team_say when it should have been say_team. Not sure how I missed that one in testing. Either it was a major goof, or it actually worked somehow in past versions of CS:S.
    • Fixed #format in the translations files. The only file that should have the format command is the English version.
    • THANKS to Bacardi for actually fixing these. I just updated the front page here.
    • Updated the compiler to user SM 1.3
    • Added more folder structure to the Translations.zip so it was obvious where the files belonged.
    Version 2.3 (Jan 4, 2010)
    • Added cvar to allow advertisement message to be turned on/off since it's been working for 6 months and I'm forgetful
  • Version 2.2 (June 25, 2009)
    • Changed the translations file(s) format
  • Version 2.1 (Feb 20, 2009)
    • Fixed manual binding via console wasn't working
    • Cleaned up some code and added checks so code only runs when parameters match
  • Version 2.0 (Feb 17, 2009)
    • Recoded to fix binds not working properly
    • Added automatic creation of config file ../cstrike/cfg/sourcemod/teambets.cfg
  • Version 1.4 (June 29th)
    • Updated to conform to new plugin submission standards.
    • Changed version CVAR to sm_teambets_version
  • Version 1.3 (June 26th)
    • Exposed sm_bet_version cvar for tracking usage
    • Corrected translation files
  • June 18th 9PM EST
    • German translations added to plugins.teambets.cfg, provided by Isias
    • Fixed english translation of One Vs Many Start
  • Version 1.2 (June 18th)
    • Embarassing. I forgot to get the player's money before giving them back their bid and winnings.
  • June 17th Part 2
    • French Translations by magicyan (Redownload plugin.teambets.cfg)
    • Changed [TB] prefix to [Bet]
  • June 17th
    • Changed message prefix from [SM] to [TB]
    • Added a "use bet team amount" advertisement, shown to players on connect.
    • Several fixes to the One Vs Many code
    • Added "team_say" so you can bet in team_say now
    • We only hook player death and round end events in sm_bet is on now.
    • Officially incremented the version to 1.0
PLEASE DO NOT POST ALTERED VERSIONS OF THIS PLUGIN IN THIS THREAD. START YOUR OWN AS I HAVE DONE. IT'S TOO CONFUSING.

PLEASE feel free to post updated versions of the translation files, but INCLUDE all previous languages in your translation. I will then update the front page.

Translation Files indlude English, French, German,Polish,Russian, Danish, Swedish, Norwegian and Portuguese.
Attached Files
File Type: sp Get Plugin or Get Source (teambets.sp - 22668 views - 11.3 KB)
File Type: zip translations.zip (7.3 KB, 13552 views)

Last edited by |GsX| GrimReaper; 08-02-2010 at 23:01. Reason: Added cvar to block betting after a bomb plant.
|GsX| GrimReaper is offline