Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define FILTERSCRIPT
- #define DIALOG_MUSIC 1
- #define COLOUR_WHITE 0xFFFFFFFF
- public OnFilterScriptInit()
- {
- print("\n----------------------------");
- print(" Music Player | By Chilli943");
- print("-----------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_MUSIC)
- {
- if(response)
- {
- new string[126];
- format(string, sizeof(string), "%s", inputtext);
- PlayAudioStreamForPlayer(playerid, string);
- }
- else
- {
- HideMenuForPlayer(DIALOG_MUSIC, playerid);
- }
- }
- }
- CMD:playsong(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_MUSIC , DIALOG_STYLE_INPUT, "Enter the music URL", "Enter the music url", "Play", "Cancel");
- return 1;
- }
- CMD:stopsong(playerid, params[])
- {
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment