1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #if defined __round_end_music_included
- #endinput
- #endif
- #define __round_end_music_included
- public SharedPlugin __pl_round_end_music = {
- name = "round-end-music",
- file = "round_end_music.smx",
- #if defined REQUIRE_PLUGIN
- required = 1,
- #else
- required = 0,
- #endif
- };
- methodmap MusicEntry < KeyValues {
- public MusicEntry() {
- return view_as<MusicEntry>(new KeyValues("music_entry"));
- }
-
- public void SetFilePath(const char[] filePath) {
- this.SetString("filepath", filePath);
- }
- public void GetFilePath(char[] buffer, int maxlen) {
- this.GetString("filepath", buffer, maxlen);
- }
-
- public void SetTitle(const char[] title) {
- this.SetString("title", title);
- }
- public void GetTitle(char[] buffer, int maxlen) {
- this.GetString("title", buffer, maxlen);
- }
-
- public void SetSource(const char[] source) {
- this.SetString("source", source);
- }
- public void GetSource(char[] buffer, int maxlen) {
- this.GetString("source", buffer, maxlen);
- }
- }
- typedef OnSongsRequested = function void ();
- native void REM_RegisterSource(OnSongsRequested callback);
- native bool REM_AddSong(MusicEntry song);
- native int REM_GetActiveSongCount();
- forward Action OnRoundEndMusicWillPlay(MusicEntry song);
- forward void OnRoundEndMusicPlayed(MusicEntry song);
|