Overview

The Playwire Steam Plugin allows developers to easily integrate in-game advertising with their Steam Game Servers. Our plugin streamlines the development process to reward players in Steam by presenting opportunities to watch video advertising before gameplay. Currently, our plugin only supports the following game titles: Counter-Strike: Global Offensive and Team Fortress 2. Follow the steps below to get up and running.

1

Start Up Steam Server:

There are different instructions for Linux, Windows and OS X, but for our example we will be using OS X. Visit the SteamCMD Documentation page for reference
  • If you don’t have it installed already, you will need GCC, the GNU Compliler Collections, install with the following command
    $ sudo apt-get install lib32gcc1
  • On your server create a directory
    $ mkdir ~/steamcmd && cd ~/steamcmd
  • Install SteamCMD via curl
    $ curl -sqL ‘http://bit.ly/2dHRDsd’ | tar zxvf –
  • Run the Steam Shell
    ./steamcmd.sh
2

Install Game on Server:

  • Login anonymously to install game
    $ login anonymous
  • Force install the game directory
    $ force_install_dir ./tf2
  • Install and validate the game by it’s game server id: for Team Fortress 2 use “232250” and for Counter Strike: Global Offensive use “740”
    $ app_update 232250 validate
  • Wait for the game to download, this part may take a while depending on your connection
  • Exit the Steam shell by pressing Ctrl+Capp_update 232250 validate
  • Run the Team Fortress game server with the following command
    bash srcds_run -console -game tf +sv_pure 1 +map ctf_2fort +maxplayers 24
  • The server will boot up, with the flags and settings you set
  • Using the Steam Game Client, find either Team Fortress 2 or Counter Strike: Global Offensive depending on which game server you started, for our example we will be using Counter Strike: Global Offensive
  • Add the game to your library and start the game
  • Click “Find a Game” > Community Servers
  • Add your server’s IP to your favorites while testing
  • After successfully joining your game server, quit the server and proceed to step 3
3

Install Playwire Plugin:

Please contact your Playwire Media Account Manager to obtain your customized plugin. Our plugin requires both SourceMod and MetaMod.
  • Install the SourceMod and MetaMod dependencies
  • After installing the required dependencies, locate the playwire-steam-ads.zip file your Playwire Media Account Manager gave you during onboarding
  • Using Secure Copy (scp) or the method of your choice, move the plugin .zip file onto your server
  • Unpack the plugin .zip file on your server
  • The plugin will expand several folders and the actual plugin file is called playwire_steam_ads_motd.smx
  • After testing to confirm the plu
  • You will only be making changes to the config file which is called plugin.playwire_steam_ads_motd.cfg
├── playwire-steam-ads │ ├── addons │ │ └── sourcemod │ │ └── plugins │ │ └── playwire_steam_ads_motd.smx │ ├── cfg │ │ └── sourcemod │ │ └── plugin.playwire_steam_ads_motd.cfg
4

Usage:

The plugin will display a video ad to the user before they enter your Steam Game Server. The plugin is simple to customize with your own messaging. There are 2 configurable options for the plugin.playwire_steam_ads_motd.cfg file included with the plugin a typical implementation might look something like this:
  • To in Counted
    post_message “Thank you for watching”

// This file was auto-generated by SourceMod (v1.8.0.5929)
// ConVars for plugin "phoenix_motd.smx"


// Custom message after advert complete
// -
// Default: "Thank you for watching"
post_message "Thank you for watching"

// my example variable
// -
// Default: "0"
server_id "0"

// Custom message during advert
// -
// Default: "Custom Message - This server is supported by ads"
video_message "Custom Message - This server is supported by ads"

Demo Plugin Experience
  • Was this Support Article Helpful ?
  • yes   no