123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #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);
- }
-
- public bool HasFilePath(const char[] filePath) {
- char thisFilePath[PLATFORM_MAX_PATH];
- this.GetFilePath(thisFilePath, sizeof(thisFilePath));
-
- return StrEqual(thisFilePath, filePath);
- }
-
- public bool Equals(MusicEntry other) {
- char otherFilePath[PLATFORM_MAX_PATH];
- other.GetFilePath(otherFilePath, sizeof(otherFilePath));
-
- return this.HasFilePath(otherFilePath);
- }
- }
- native bool REM_AddSong(MusicEntry song);
- native int REM_GetActiveSongCount();
- native bool REM_SongWasRecentlyPlayed(MusicEntry song);
- forward Action OnRoundEndMusicWillPlay(MusicEntry song);
- forward void OnRoundEndMusicPlayed(MusicEntry song);
- forward void OnRoundEndSongsRequested();
|