Raised This Month: $32 Target: $400
 8% 

TeamBets 2.6 (Mani Conversion)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
|GsX| GrimReaper
Senior Member
Join Date: Sep 2008
Plugin ID:
775
Plugin Version:
2.6
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Bet on which team will win for cash!
    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 - 22640 views - 11.3 KB)
    File Type: zip translations.zip (7.3 KB, 13535 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
    |GsX| GrimReaper
    Senior Member
    Join Date: Sep 2008
    Old 02-17-2009 , 19:46   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #2

    I did the fresh install with the latest MM and SM and here's what I see with MY STYLE of binds, which I will detail as well.





    As you can see, it's working. Now, how do I do it?!?

    In your ../steam/steamapps/USERNAME/counter-strike/cstrike/cfg folder, either edit your autoexec.cfg to include:

    alias "bet_t_all" "say bet t all"
    alias "bet_ct_all" "say bet ct all"
    bind "LEFTARROW" "bet_ct_all"
    bind "RIGHTARROW" "bet_t_all"

    Or, if you don't use an autoexec.cfg, here's one with this info in it.
    Attached Files
    File Type: cfg autoexec.cfg (141 Bytes, 2334 views)
    |GsX| GrimReaper is offline
    Snake60
    Senior Member
    Join Date: Jul 2008
    Location: Russia, Pskov
    Old 02-18-2009 , 05:39   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #3

    Now it works fine!
    Good Job!

    My + in karma

    And my russian translation:
    Attached Files
    File Type: txt plugin.teambets.txt (4.6 KB, 1248 views)
    Snake60 is offline
    Send a message via ICQ to Snake60 Send a message via MSN to Snake60 Send a message via Skype™ to Snake60
    |GsX| GrimReaper
    Senior Member
    Join Date: Sep 2008
    Old 02-18-2009 , 19:21   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #4

    Updated the translation file on the first post.

    What fixed it for you, installing this version, or changing your binding method to the way I suggested?!?
    |GsX| GrimReaper is offline
    Snake60
    Senior Member
    Join Date: Jul 2008
    Location: Russia, Pskov
    Old 02-19-2009 , 02:26   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #5

    Quote:
    Translation FIle indludes English, French, German and Polish.
    Maybe
    Quote:
    Translation file includes English, French, German, Polish and Russian.
    Quote:
    What fixed it for you, installing this version, or changing your binding method to the way I suggested?!?
    Yes, I install you version and type your aliases in autoexec.cfg like you say, and binds works fine ;) One more tnx

    to moderators
    Why this plugin don't approved??? It works perfect!
    Snake60 is offline
    Send a message via ICQ to Snake60 Send a message via MSN to Snake60 Send a message via Skype™ to Snake60
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 02-19-2009 , 10:29   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #6

    Is it me, or we already have mani teambets in approved plugins?
    __________________
    shustas is offline
    Carn
    Member
    Join Date: Jun 2008
    Old 02-19-2009 , 13:26   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #7

    I dont see anything listed for dependency

    [SM] Plugin teambets.smx failed to load: Native "VerifyCoreVersion" was not found
    Carn is offline
    |GsX| GrimReaper
    Senior Member
    Join Date: Sep 2008
    Old 02-19-2009 , 19:40   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #8

    TO shustas... Yes there is an approved version. IT IS BROKE, AND UNSUPPORTED. Have you read that thread in the last 6+ months? I altered allot of code and fixed it, but the author never came around to update the code on the front page, which most people try to use. I created this thread so people could get a working version, which I named 2.0 simply for clarification. It's the same code I posted in the original thread as 1.6, and I credited the original author.

    To Carn... I didn't include a dependency, but I will now do a Requirements and add some key Notes. It didn't work for you because the online compiler has been updated to 1.1 and it is not compatible with old installs. At least that's the way I understood the "News" item on the SM frontpage. I believe old plugins will work with the latest SM, but plugins compiled against the new SM will not work in the old versions of SM. That said, update your MM and SM to the latest releases, or follow the Notes section in the first post.

    Last edited by |GsX| GrimReaper; 02-19-2009 at 20:05.
    |GsX| GrimReaper is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 02-20-2009 , 11:03   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #9

    How come it did not work if Im using it and it works perfect? Anything Im missing here? Or is it something special that is not working? Or what?
    __________________
    shustas is offline
    |GsX| GrimReaper
    Senior Member
    Join Date: Sep 2008
    Old 02-20-2009 , 18:07   Re: TeamBets 2.0 (Mani Conversion)
    Reply With Quote #10

    As the previous version's thread says over and over, we couldn't get it to work with binds. You could type the bet fine, but if you used aliases and binds, or even just manual binds, it wouldn't function. It would output to the text chat area, without going to the plugin.

    I messed with it until I got it to work, by reading the scripting tutorials and making a bunch of changes.

    I then contacted the original author via PM, and got no response. Then I posted my altered version to share with the world, and asked the original author to take a look and update the plugin. Still no response. So, in order to provide a searchable thread that was active and supported (although I'm a n00b at SM coding), I reposted my altered version as it's own new plugin, and clearly stated that ferret was the original author.

    I would suggest that if the old version is working for you, use it. It makes me no difference, but the problem was well documented and you never posted any assistance, so I don't understand why you are posting now. You come across as rather argumentative, when I am simply trying to provide something useful to the community with my limited coding skills.

    Can you successfully use binds on your server, because it seems all other comments suggest it is in fact broken, and not a figment of my warped imagination.
    |GsX| GrimReaper 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 16:24.


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