Monthly Target: $400 Donations: $140
 35% 

[CS:S] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
2528
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    17 
    Plugin Description:
    A menu minigame to earn money and to kill time.
    Old 08-31-2011 , 03:31   [CS:S] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #1

    Blackjack

    Play your favourite casino game ingame! This is a blackjack implementation using the most common rules. Only hit, stay and doubling the bet is allowed (no split and insurances).
    Ever got bored when dead and waiting for the round to end? Now you're able to make some money playing blackjack - just needs some luck
    This plugin is based off sega74rus' eventscript version, but improved to apply the rules more strictly. Can't stress this enough - this guy does some great plugins!

    Currently this is only 1 player against the dealer. No multiplayer yet

    Player Commands:
    • sm_bj - Opens the blackjack game.
    • sm_blackjack - Alias
    • sm_bjhelp - Displays the blackjack help and settings.
    Players may set the game to show automatically on death and hide on spawn in their !bjhelp menu. If clientprefs is running, the decicion is saved and restored on rejoin.



    Rules:
    You are dealt an initial two card hand with the option of drawing cards to bring the total value to 21 or less without exceeding it, so that the dealer will lose by having a lesser hand than the player or by exceeding 21.
    If you've a value of 21 with only your first 2 cards you've got an blackjack and always win; except if the dealer has a blackjack too.
    If you exceed 21 you "overbuyed" (busted) yourself and lose. If both players have less than 21 points, the one closer to 21 wins. If both have the same value, it's a draw, except one has a blackjack and the other one just has 21 with more than 2 cards.

    You've got 3 options ingame after placing your bet:
    • Hit: Draw another card.
    • Stay: Stay with your current cards and let the dealer start to draw cards.
    • Double: Double your current bet, draw one last card and stay.
    Number-cards count as their natural value; the pictures count as 10; aces are valued as either 1 or 11 according to the player's best interest.
    So if you have an ace on your hand and e.g. a 2 you'll see two possible values as "3/13".
    Note that the dealer has to draw a card if he's less than 17 points and stops to draw if he reaches 17. He also has to count the ace as 11 if he wouldn't exceed 21 by doing so.

    You win 3x your bet with a blackjack, 2x if you win and 1x on a draw. You will only lose your bet if you fail.

    ConVars:
    • sm_blackjack_version - ...
    • sm_blackjack_maxbet - Set the maximal amount of money a player is able to bet per game. (Default: 5000)
    • sm_blackjack_advertondeath - Show an advert on death, if player didn't play already? (Default: 1)

    Did you see...:

    Attached Images
    File Type: jpg blackjackgamepanel.jpg (27.7 KB, 195 views)
    Attached Files
    File Type: sp Get Plugin or Get Source (blackjack.sp - 1524 views - 25.3 KB)
    __________________

    Last edited by Peace-Maker; 09-27-2016 at 19:17. Reason: Upload new screenshot
    Peace-Maker is offline
    musosoft
    Senior Member
    Join Date: Dec 2008
    Location: Czech Republic
    Old 08-31-2011 , 04:47   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #2

    Awesome! Trying it right now!

    edit: works excellent GJ!

    Feature request: optional chat messages about wins & losses
    __________________
    Rivals.cz - Last Czech/Slovak CS:S server.

    Last edited by musosoft; 08-31-2011 at 05:32.
    musosoft is offline
    Despirator
    Senior Member
    Join Date: Jun 2011
    Location: Kazakhstan ->Shymkent
    Old 08-31-2011 , 05:40   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #3

    what about sega74rus's IpToCity plugin, can you make it?
    Despirator is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 08-31-2011 , 07:44   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #4

    duh, that one queries ip-whois.net.. I don't think that's that interesting I prefer the tetris one!
    __________________
    Peace-Maker is offline
    Despirator
    Senior Member
    Join Date: Jun 2011
    Location: Kazakhstan ->Shymkent
    Old 08-31-2011 , 11:22   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #5

    but there is need encoding to the UTF-8
    Despirator is offline
    delachambre
    SourceMod Donor
    Join Date: Jan 2011
    Location: France
    Old 08-31-2011 , 11:58   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #6

    Yeiiih !

    Good job, thanks for plugins

    Delachambre.
    delachambre is offline
    Leonardo
    Veteran Member
    Join Date: Feb 2010
    Location: Soviet Union
    Old 08-31-2011 , 14:14   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #7

    how about in-game solitaire?
    Leonardo is offline
    musosoft
    Senior Member
    Join Date: Dec 2008
    Location: Czech Republic
    Old 09-05-2011 , 18:51   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #8

    Players cheat with this when warmup ends, is there any way to disable bj at buy time? thanks
    __________________
    Rivals.cz - Last Czech/Slovak CS:S server.
    musosoft is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 09-05-2011 , 19:24   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #9

    They cheat with blackjack? How so? Kick them out of your casino!
    __________________
    Peace-Maker is offline
    musosoft
    Senior Member
    Join Date: Dec 2008
    Location: Czech Republic
    Old 09-06-2011 , 07:08   Re: [ANY] Blackjack (Version 1.0) - Play blackjack while waiting for respawn!
    Reply With Quote #10

    Quote:
    Originally Posted by Peace-Maker View Post
    They cheat with blackjack? How so? Kick them out of your casino!
    I have mp_startmoney 800, they withdraw money after warmup round end, and get twice, so first normal round they get mp5 instead of usp and so.
    __________________
    Rivals.cz - Last Czech/Slovak CS:S server.
    musosoft is offline
    Reply


    Thread Tools
    Display Modes

    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 23:35.


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