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

[ANY] Snake Minigame (Version 1.0)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
2609
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    30 
    Plugin Description:
    Snake minigame in a panel including highscores.
    Old 10-17-2011 , 18:52   [ANY] Snake Minigame (Version 1.0)
    Reply With Quote #1

    Snake
    A Snake and Snake 2 minigame simulation.

    What's the Source Engine without some retro games? Play Snake in a panel on the left while being dead or waiting for more players. Play with your movement keys and try to eat as much food before biting yourself or hitting the wall.



    Just type !snake (sm_snake) in chat to open the main menu and choose the gamemode.

    This plugin features 2 gamemodes.
    • Snake 1 style: Solid walls. Game over, if you touch the border of the gamefield
    • Snake 2: Sneaking through a wall brings you to the opposite side.

    Each gamemode has it's own top10 accessible from the !snake mainmenu.

    Sometimes there's going to be a second piece of food laying around. Try to get it fast, as it's not there forever! You're going to lose some weight and get shorter.

    Installation:
    1. Upload the snake.smx into you sourcemod/plugins folder.
    2. Edit your databases.cfg and add a "snake" section to save the highscores in. If you don't add anything, highscores will be stored in sourcemod's default "storage-local" sqlite database.
      1. SQLite:
        Code:
            "snake"
            {
                "driver"            "sqlite"
                "database"            "snake"
            }
      2. MySQL:
        Code:
            "snake"
            {
                "driver"            "mysql"
                "host"                "localhost"
                "database"            "snake"
                "user"                "youruser"
                "pass"                "yourpass"
                //"timeout"            "0"
                "port"            "3306"
            }
      3. If you use mysql, execute this query to create the table:
        PHP Code:
        CREATE TABLE `snake_players` (
        `
        steamidVARCHAR64 NOT NULL,
        `
        nameVARCHAR64 NOT NULL,
        `
        score1INT NOT NULL DEFAULT '0',
        `
        score2INT NOT NULL DEFAULT '0',
        PRIMARY KEY ( `steamid` )
        ENGINE InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
    Known issues:
    Some users' machines are unable to display UTF-8 chars ingame, so they won't be able to play this game as they will only see messy squares all over. It's clientside and i don't know how to fix that ;)

    Thanks to:
    • berni/Chanz for their fabulous smlib

    Did you see...:

    Note: This plugin won't compile on the forum due to it's custom include. Use the provided .smx or compile yourself.
    Attached Images
    File Type: jpg snakegamepanel.jpg (29.1 KB, 3212 views)
    Attached Files
    File Type: sp Get Plugin or Get Source (snake.sp - 1608 views - 24.8 KB)
    File Type: smx snake.smx (34.3 KB, 1998 views)
    __________________

    Last edited by Peace-Maker; 09-27-2016 at 18:16. Reason: Upload new screenshot
    Peace-Maker is offline
     



    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:07.


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