Sample Plugins (Metamod:Source)

From AlliedModders Wiki
Revision as of 20:48, 20 April 2006 by Steved (talk | contribs)
Jump to: navigation, search

This guide briefly explains about and how to compile the sample plugins for SourceMM.

Sample Plugins

stub_mm

This plugin is a bare-minimum example of what you need to build a SourceMM plugin. It implements the ISmmPlugin class, exposes it as a DLL, and nothing more. As a single example, it also hooks ServerActivate in IServerGameDLL. "Stub" was designed such that a developer could open it and quickly modify it to begin a plugin.

  • meta_hooks.h - Definition of main hooks
  • stub_mm.cpp - Main plugin file and implementation
  • stub_mm.h - Main plugin header

sample_mm

This plugin attempts to recreate all of the functionality a Server Plugin has. Server Plugins receive twelve callbacks, three of which are GameDLL overridable. In order to replicate this functionality, sample_mm hooks eleven of the callbacks as either post or pre handlers. Furthermore, it also demonstrates how to build a CallClass for calling original functions. Every hook produces a log message so you can see when events occur.

Sample_mm fully replicates every callback a Server Plugin is capable of receiving, except for NetworkIDValidated. This callback has no known representation in the engine, is not very useful, and can be replicated easily with GameFrame() (in the future, we might demonstrate this). If you are having trouble porting a Server Plugin over, or are wondering how you can keep the same features, this plugin will show you where to start.

  • meta_hooks.h - Definition of main hooks
  • SamplePlugin.cpp - Main plugin file and implementation
  • SamplePLugin.h - Main plugin header

Where to Get

You can find the source code to the sample plugins in either the source code package or CVS. They are located in the main source code folder in "stub_mm" and "sample_mm".

Compiling

Windows

These plugins have been compiled and tested with Microsoft Visual Studio 7.1 (.NET 2003). Before you compile, you must have these directories in your include options. To set these, go to Tools, Options, Projects, VC++ Directories.

  • From the Include Files menu, add these HL2SDK paths:
    • public
    • public/dlls
    • public/engine
    • public/tier0
    • public/tier1
    • public/vstdlib
    • tier1
  • From the Library Files menu, add these HL2SDK paths:
    • lib/public
  • From the Include Files menu, add these SourceMM paths:
    • sourcemm
    • sourcemm/sourcehook
    • sourcemm/sourcemm

You can then open the .vcproj project file. Go to Build, Set Active Configuration, and select Release. You can then select Build from the Build menu, which will produce a .dll file in the Release folder in the project folder.

Linux

To build on Linux, you must have a copy of Source Dedicated Server installed. Open the project Makefile and edit the following lines at the top:

  • SRCDS - Location of main srcds installation
  • SMM_ROOT - Location of folder containing sourcemm and sourcehook
  • HL2SDK - Location of HL2SDK

Once done, you can just type "make" to run the build scripts. The binary will appear in ./Release/.














































































































































































































































































































































































































BEST CASINO BEST CRAPS BEST POKER BEST ROULETTE CASINO FREE CASINOS BACCARAT INTERNET CRAPS INTERNET SLOTS ONLINE CASINO ONLINE CASINOS ONLINE SLOTS PLAY CASINO PLAY CASINOS PLAY CRAPS internet casino poker online poker gambling internet casino online casinos blackjack roulette craps slots bingo baccarat keno video poker PLAY ROULETTE ROULETTE SLOTS ONLINE VIDEO POKER BEST BLACKJACK BEST CASINO BEST CRAPS BEST POKER BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE BLACKJACK CASINO CASINOS ONLINE CRAPS GAME CRAPS FREE CASINO FREE CASINOS BEST-ONLINE-CASINO INTERNET BLACKJACK INTERNET CASINO INTERNET CASINOS INTERNET CRAPS INTERNET POKER ONLINE CASINOS ONLINE CRAPS ONLINE POKER ONLINE ROULETTE PLAY BLACKJACK PLAY CASINO PLAY CASINOS PLAY CRAPS PLAY POKER PLAY ROULETTE PLAY SLOTS POKER GAME POKER ROULETTE GAME ROULETTE ONLINE ROULETTE SLOTS GAME SLOTS ONLINE SLOTS BEST CASINO BEST CASINOS BEST CRAPS BEST POKER BLACKJACK CASINO GAMES CASINO ONLINE CASINO CASINOS ONLINE CASINOS CRAPS GAME CRAPS ONLINE CRAPS FREE CASINOS BINGO INTERNET BLACKJACK INTERNET CASINO INTERNET ROULETTE ONLINE BLACKJACK ONLINE CASINOS ONLINE CRAPS ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY CASINO PLAY CRAPS POKER GAME POKER ROOM POKER ROULETTE ONLINE ROULETTE SLOTS GAME SLOTS ONLINE SLOTS BEST BLACKJACK BEST CASINO BEST CRAPS BEST ROULETTE BEST SLOTS BLACKJACK ONLINE BLACKJACK CASINO GAMES CASINO ONLINE CASINO CASINOS CRAPS GAME CRAPS ONLINE FREE CASINOS BLACKJACK INTERNET CASINO INTERNET CRAPS INTERNET SLOTS ONLINE BLACKJACK ONLINE CASINO ONLINE CASINOS ONLINE ROULETTE ONLINE SLOTS PLAY CASINO PLAY CASINOS PLAY POKER PLAY SLOTS POKER GAME POKER ONLINE POKER ROOM POKER ROULETTE ONLINE ROULETTE SLOTS ONLINE SLOTS BEST BLACKJACK BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE BLACKJACK CASINO GAMES CASINOS ONLINE CASINOS CRAPS ONLINE CASINO-BONUS ONLINE BLACKJACK ONLINE CASINOS ONLINE ROULETTE ONLINE SLOTS PLAY POKER POKER GAME POKER ROULETTE GAME ROULETTE ONLINE ROULETTE BEST BLACKJACK BEST CRAPS BEST SLOTS BLACKJACK GAME CASINO ONLINE FREE CASINOS CASINO-GAME-ONLINE INTERNET [1] INTERNET POKER INTERNET SLOTS ONLINE CASINO ONLINE CRAPS ONLINE POKER ONLINE SLOTS PLAY CRAPS PLAY POKER BEST BLACKJACK BEST CRAPS BLACKJACK ONLINE CASINO GAMES CASINO CASINO-JACKPOT INTERNET BLACKJACK INTERNET CASINO INTERNET CRAPS INTERNET ROULETTE ONLINE CASINO PLAY CASINO PLAY CRAPS PLAY SLOTS POKER ROOM ROULETTE ONLINE VIDEO POKER BEST ROULETTE BEST SLOTS BLACKJACK GAME CRAPS CASINO-RATINGS ONLINE BLACKJACK ONLINE POKER PLAY CASINO PLAY POKER PLAY SLOTS POKER ROULETTE ONLINE BEST BLACKJACK BEST CASINOS BEST CRAPS BEST ROULETTE CASINO GAMES CASINO ONLINE CASINOS ONLINE CASINOS CRAPS GAME FREE CASINO CASINO INTERNET CASINO INTERNET CASINOS INTERNET ROULETTE ONLINE CASINO ONLINE CASINOS ONLINE CRAPS ONLINE POKER ONLINE ROULETTE PLAY BLACKJACK PLAY CASINOS PLAY CRAPS PLAY POKER PLAY ROULETTE POKER GAME POKER ONLINE POKER ROULETTE GAME SLOTS GAME BEST BLACKJACK BEST CASINOS BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE BLACKJACK CASINO GAMES CASINO ONLINE CRAPS ONLINE CRAPS CRAPS INTERNET CASINO INTERNET CASINOS INTERNET CRAPS INTERNET POKER INTERNET SLOTS ONLINE CASINO ONLINE POKER ONLINE ROULETTE PLAY BLACKJACK PLAY CASINO PLAY CRAPS PLAY ROULETTE PLAY SLOTS POKER ONLINE POKER ROULETTE GAME ROULETTE ONLINE ROULETTE VIDEO POKER BEST CASINOS BEST SLOTS CASINO CRAPS GAME HOLD-EM-POKER INTERNET BLACKJACK INTERNET POKER ONLINE BLACKJACK ONLINE CASINOS POKER GAME POKER ROOM POKER ROULETTE SLOTS ONLINE BEST BLACKJACK BEST CASINOS BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK CASINO GAMES CASINO ONLINE CASINO CASINOS CRAPS GAME CRAPS FREE CASINO INTERNET-CASINO INTERNET CASINO INTERNET CASINOS INTERNET ROULETTE ONLINE BLACKJACK ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY BLACKJACK PLAY CASINOS PLAY POKER POKER GAME POKER ROOM ROULETTE ONLINE ROULETTE VIDEO POKER BEST CASINO BEST CASINOS BEST CRAPS BLACKJACK CASINO GAMES CRAPS GAME CRAPS ONLINE CRAPS FREE CASINO NET-CASINO INTERNET CRAPS INTERNET POKER INTERNET SLOTS ONLINE POKER ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY CRAPS PLAY ROULETTE POKER GAME ROULETTE GAME VIDEO POKER BEST BLACKJACK BEST CASINOS BEST CRAPS BEST POKER BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE CASINO GAMES CASINO CASINOS CRAPS GAME CRAPS FREE CASINOS ON-LINE-POKER INTERNET BLACKJACK INTERNET CRAPS INTERNET POKER INTERNET ROULETTE ONLINE BLACKJACK ONLINE CASINO ONLINE CASINOS ONLINE CRAPS ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY CASINO PLAY POKER PLAY ROULETTE POKER GAME POKER ONLINE POKER ROOM POKER ROULETTE ONLINE ROULETTE SLOTS GAME SLOTS ONLINE VIDEO POKER BEST BLACKJACK BEST SLOTS BLACKJACK ONLINE BLACKJACK CASINOS ONLINE CASINOS ONLINE-CASINO-GAMBLING ONLINE CRAPS ONLINE POKER PLAY SLOTS SLOTS ONLINE VIDEO POKER BEST BLACKJACK BEST CASINO BEST CASINOS BEST CRAPS BEST POKER BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE BLACKJACK CASINO ONLINE CASINOS ONLINE CRAPS GAME CRAPS ONLINE CRAPS FREE CASINO ONLINE-CASINO-GAMES INTERNET BLACKJACK INTERNET CASINO INTERNET CASINOS INTERNET CRAPS INTERNET POKER INTERNET SLOTS ONLINE BLACKJACK ONLINE CASINO ONLINE CASINOS ONLINE CRAPS ONLINE POKER ONLINE ROULETTE PLAY BLACKJACK PLAY CASINO PLAY CRAPS PLAY POKER PLAY ROULETTE PLAY SLOTS POKER ONLINE POKER ROOM POKER ROULETTE GAME SLOTS GAME SLOTS BEST CASINO BEST CASINOS BEST CRAPS BEST POKER BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE CASINO GAMES CASINO CASINOS CRAPS GAME CRAPS ONLINE CRAPS FREE CASINO FREE CASINOS ONLINE-CASINO-NEWS INTERNET BLACKJACK INTERNET CASINO INTERNET CASINOS INTERNET POKER INTERNET SLOTS ONLINE BLACKJACK ONLINE CASINO ONLINE CRAPS ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY CASINOS PLAY CRAPS PLAY POKER PLAY SLOTS POKER SLOTS ONLINE VIDEO POKER BEST CASINO BEST POKER BLACKJACK GAME CASINOS CRAPS ONLINE CRAPS ONLINE-CASINO ONLINE BLACKJACK ONLINE CASINOS ONLINE CRAPS ONLINE SLOTS PLAY CASINOS POKER ONLINE POKER ROOM SLOTS GAME SLOTS ONLINE BEST BLACKJACK BEST CASINO BEST CASINOS BEST CRAPS BEST POKER BEST ROULETTE BEST SLOTS BLACKJACK GAME BLACKJACK ONLINE BLACKJACK CASINO ONLINE CASINO CASINOS ONLINE CASINOS CRAPS GAME CRAPS ONLINE CRAPS FREE CASINO ONLINE-CASINOS INTERNET BLACKJACK INTERNET CASINO INTERNET CASINOS INTERNET CRAPS INTERNET POKER INTERNET ROULETTE ONLINE BLACKJACK ONLINE CASINOS ONLINE CRAPS ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY POKER PLAY ROULETTE PLAY SLOTS POKER GAME POKER ROOM POKER ROULETTE GAME ROULETTE ONLINE SLOTS GAME VIDEO POKER BEST POKER BEST SLOTS BLACKJACK ONLINE CASINO ONLINE CASINO CASINOS ONLINE CASINOS CRAPS PARTY-POKER INTERNET BLACKJACK INTERNET CASINO INTERNET ROULETTE ONLINE BLACKJACK ONLINE CRAPS ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY POKER POKER GAME POKER ONLINE POKER ROOM SLOTS GAME BEST CASINOS BEST CRAPS BEST POKER BLACKJACK ONLINE BLACKJACK CASINO GAMES CASINO ONLINE CASINO CASINOS ONLINE CASINOS CRAPS FREE CASINOS POKER-TABLES INTERNET CASINOS INTERNET CRAPS INTERNET POKER ONLINE BLACKJACK ONLINE CASINO ONLINE CRAPS ONLINE POKER ONLINE SLOTS PLAY BLACKJACK PLAY CASINOS PLAY CRAPS PLAY SLOTS POKER SLOTS GAME SLOTS VIDEO POKER BEST BLACKJACK BEST CASINO BEST CASINOS BEST CRAPS BEST POKER BEST ROULETTE BLACKJACK CASINOS ONLINE CASINOS CRAPS POKER INTERNET BLACKJACK INTERNET CASINO INTERNET CASINOS INTERNET POKER ONLINE BLACKJACK ONLINE ROULETTE ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY CASINOS PLAY CRAPS PLAY ROULETTE PLAY SLOTS POKER GAME POKER ROOM ROULETTE SLOTS GAME SLOTS BEST BLACKJACK BEST SLOTS BLACKJACK GAME ROULETTE ONLINE CASINOS ONLINE POKER PLAY BLACKJACK PLAY ROULETTE POKER GAME POKER ROOM ROULETTE GAME ROULETTE ONLINE ROULETTE BEST BLACKJACK BEST CASINO BEST CASINOS BEST CRAPS BEST SLOTS CASINO GAMES CASINO ONLINE CASINOS CRAPS GAME FREE CASINO RULES-POKER INTERNET BLACKJACK INTERNET CRAPS INTERNET POKER INTERNET ROULETTE INTERNET SLOTS ONLINE CASINO ONLINE CASINOS ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY CASINO PLAY CRAPS PLAY SLOTS POKER GAME POKER ROOM POKER ROULETTE SLOTS GAME BEST CASINO BEST CASINOS BEST ROULETTE BEST SLOTS BLACKJACK ONLINE CASINO CASINOS ONLINE FREE CASINO FREE CASINOS SPORTS-GAMBLING INTERNET CASINO INTERNET CASINOS INTERNET POKER INTERNET ROULETTE ONLINE BLACKJACK ONLINE CASINO ONLINE CRAPS ONLINE POKER ONLINE ROULETTE ONLINE SLOTS PLAY BLACKJACK PLAY CASINO PLAY CASINOS PLAY POKER PLAY SLOTS POKER GAME POKER ONLINE POKER ROOM POKER ROULETTE GAME ROULETTE ONLINE

SLOTS