Coder Social home page Coder Social logo

crimsontautology / sm-in-game-audio Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 1.02 MB

Sourcemod Plugin to connect with the in-game-audio web api

License: GNU General Public License v3.0

SourcePawn 97.59% Pawn 0.32% Makefile 2.09%
sourcemod sourcepawn music game-audio

sm-in-game-audio's Introduction

DEPRECATED

This will no longer work due to changes to the in-game Chromium web browser.

In Game Audio

Build Status

Allows users to listen to music while in game. Uses a hidden MOTD page to play the music using an external web service. Should work for any Source game that can run Sourcemod.

##Installation

  • Install the smjansson extension (Included in repository).
  • Install the SteamWorks extension (Included in repository).
  • Compile plugins with spcomp (e.g.)

spcomp in_game_audio_base.sp

  • Compiled .smx files into your "<modname>/addons/sourcemod/plugins" directory.
  • Setup the sm_iga_url cvar to point to the root url of the web interface.

sm_iga_url "http://iga.example.com"

  • Get an api key from the web interface and assign it to the sm_iga_api_key cvar.

sm_iga_api_key "apikey"

##Requirements

  • SMJansson
  • SteamWorks
  • A Web Site Backend
  • Players must have HTML Message Of The Days enabled for this to work. This can be enabled via advanced settings of by typing cl_disablehtmlmotd 0 into console.

#CVARs

  • sm_iga_url - the root url for the website you will be interacting with.
  • sm_iga_api_key - the api key required to interact with the web api.
  • sm_iga_enabled - sets whether the plugin is enabled or not.
  • sm_iga_vips_only - sets whether only VIPs (players with adminflag 'O') can use certain commands (e.g. sm_pall).
  • sm_iga_request_cooldown_time - the cool down period a user must wait through before they can use another command that makes an HTTP call.

IGA Base

Handles all calls to the web server and provides a framework to play music for players. Also controls the user's preferences such as whether they have pall enabled and the volume

  • sm_vol [0-10] - Set's the user's volume; 10 the loudest and 0 is mute. Brings up a menu if called without an argument.
  • sm_nopall - Disables playing music that is played for all users (e.g. sm_pall, VIP intros). The user can still play to themselves with commands such as sm_p
  • sm_yespall - Enables playing music that is played for all users.
  • sm_iga - Bring up the IGA settings and control menu.
  • sm_ptoo - Replay the last song for yourself.

IGA Player

Handles the commands that let players play songs to themselves and to each other.

  • sm_p [category]/[name] - Plays a song for the user. If given no arguments it will play a random song. If given a category or a category and subdirectory (separated by '/') it will play a random song in that category or subdirectory. If given the full path to a song it will play that specific song. If a matching category or song is not found it will treat the argument as a search key and return a list of songs that match.
  • sm_stop - Stops the currently playing song for the user.
  • sm_pall [category]/[name] - The same as sm_p but plays for all users on the server (that have sm_yespall enabled). Only VIPs can use this command if the sm_iga_vips_only is set to 1.
  • sm_plist - Pops up the MOTD browser showing a web page that lists all available songs and categories that can be played.
  • sm_fpall [category]/[name] - Admin command. Overrides the current pall and plays a song to all users
  • sm_fstop - Admin command. Stops the currently playing song for all users.

#IGA Map Change Will play a random "map theme" during the map change transition. If map voting is enabled on the server it will start when the map vote is called. This will override a pall if it is playing.

#IGA VIP Intro Will play a VIP's "theme song" when they join the server. Theme songs are generally short, ~10 seconds in length and can be set through the web page. This will not override a pall if they join while one is playing.

#IGA Karaoke Allows admins to start a karaoke player using IGA. A Karaoke song will need a song_id from the iga website with a corresponding lyric .lrc file. Set which songs are available to be karaoked in addons/sourcemod/configs/iga.karaoke.cfg and store your .lrc files in addons/sourcemod/data/karaoke/. Bring up the karaoke menu with the sm_karaoke command.

  • sm_karaoke - Admin command. Brings up a list of songs that can be used with karaoke.

#Extending This plugin provides a bunch of natives that you can extend and interact with the web service with. Look at the in_game_audio.inc file for documentation.

sm-in-game-audio's People

Contributors

crimsontautology avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sm-in-game-audio's Issues

Audio Archive of iga.serverisnotcrash.com?

No idea how to contact you so I'm posting an issue here. Hope that's okay ๐Ÿ˜„

I think you were the last remaining IGA host with the audio files from 2fort2furious. I found out by googling the "g/scjag" name from memory because I used to spam that on the server back in the days. I managed to get some sound files by capturing the http request url from the fistful of frags server, weird stuff I know.

Anyways do you by any chance have an archive of the sound files from those days? I'm an internet archivist so to speak and it would be great to store those somewhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.