Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include "../include/gl_common.inc"
- #define Dialog_Music 1
- enum SInfo
- {
- SongName[24],
- SongURL[100]
- };
- new Songs[][SInfo] =
- {
- {"כתובת השיר", "שם השיר"},
- {"כתובת השיר", "שם השיר"},
- {"כתובת השיר", "שם השיר"},
- {"כתובת השיר", "שם השיר"},
- {"כתובת השיר", "שם השיר"}
- };
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256], SMusic[24], idx;
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/Music", true) == 0)
- {
- for(new i, j = sizeof(Songs); i < j; i++) format(SMusic, sizeof(SMusic), "%s\n", Songs[i][SongName]);
- ShowPlayerDialog(playerid, Dialog_Music, DIALOG_STYLE_LIST, "{FFFF00}Music List", SMusic, "הפעל", "ביטול");
- return 1;
- }
- if(strcmp(cmd, "/StopMusic", true) == 0) return StopAudioStreamForPlayer(playerid), SendClientMessage(playerid, 0xFF0000AA, "[MusicSystem] >> {FFFFFF}.השיר הופסק");
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Dialog_Music && response) return PlayAudioStreamForPlayer(playerid, Songs[listitem][SongURL]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement