Skip to content

Added FF2R_StopMusic(); and FF2R_PlayMusic(); natives - #368

Merged
Batfoxkid merged 2 commits into
Batfoxkid:mainfrom
Emir42502:main
May 27, 2026
Merged

Batfoxkid merged 2 commits into
Batfoxkid:mainfrom
Emir42502:main

Conversation

@Emir42502

Copy link
Copy Markdown
Contributor

Added FF2R_StopMusic(); and FF2R_PlayMusic(); natives StopMusic stops any music currently playing for all clients but does not play any other music after its called. PlayMusic restores the music loop that starts when the round starts and makes it so that it plays a random music when called and after that music ends plays another just like the normal loop in ff2r.

Added for boss's that might have their ability stop a music play something else for the ability duration and then restart the music.

Also tested these natives and they work fine.

First time trying to contribute to this plugin i might have done something wrong at somewhere please correct me if i have done so.

Added FF2R_StopMusic(); and FF2R_PlayMusic(); natives StopMusic stops any music currently playing for all clients but does not play any other music after its called. PlayMusic restores the music loop that starts when the round starts and makes it so that it plays a random music when called and after that music ends plays another just like the normal loop in ff2r.
@M60TM

M60TM commented May 25, 2026

Copy link
Copy Markdown
Contributor

Did you know ff2r supports old natives (for backwards compatiability)?

native void FF2_StartMusic(int client=0);
native void FF2_StopMusic(int client=0);

You can use these native by declaring these on start. If you wanna see more information, see core/natives_old.sp

@Emir42502

Copy link
Copy Markdown
Contributor Author

oh. i didnt know about that lol

@Batfoxkid Batfoxkid left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could provide more functionality like being able to choose a specific player to start/stop music upon. Similar to older FF2 natives FF2_StartMusic/FF2_StopMusic.

Added new params for the new natives
@Emir42502

Copy link
Copy Markdown
Contributor Author

i feel like the new changes i made are probably very very shitty but i might be wrong

@Batfoxkid
Batfoxkid merged commit 6d9a099 into Batfoxkid:main May 27, 2026
2 checks passed
@Emir42502

Copy link
Copy Markdown
Contributor Author

yippe :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants