Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
[forums.alliedmods.net]

[ANY] Snake Minigame (Version 1.0)

[forums.alliedmods.net]

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 17.10.2011 23:52

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 Files
File Type: sp Get Plugin or Get Source (snake.sp - 24.8 KB)
File Type: smx snake.smx (34.3 KB, N/A views)

Wyświetl pełny artykuł





Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych