Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Original From Pro Scripter [Malaysia] [Ak]mal
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- public OnFilterScriptInit()
- {
- print("\n- Best Simple Radio By [Ak]mal -\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFF00FFFF, ":: {FFFFFF}Best Simple Radio By [Ak]mal {FF00FF}::");
- SendClientMessage(playerid, 0xFF00FFFF, ":: {FFFFFF}/radio, /stream, /music & /shh {FF00FF}::");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 300)
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayAudioStreamForPlayer(playerid, "http://bit.do/derip");
- }
- if(listitem == 1)
- {
- PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
- }
- if(listitem == 2)
- {
- // PlayAudioStreamForPlayer(playerid, "");
- }
- if(listitem == 3)
- {
- // PlayAudioStreamForPlayer(playerid, "");
- }
- if(listitem == 4)
- {
- StopAudioStreamForPlayer(playerid);
- }
- }
- }
- return 0;
- }
- COMMAND:radio(playerid, params[])
- {
- ShowPlayerDialog(playerid, 300, DIALOG_STYLE_LIST, ":: Radio ::", "{FFFFFF}Drift Tokyo\nSoma Fm\nRadio [1]\nRadio [2]\n{FF0000}Shh...", "Play", "Cancel");
- return 1;
- }
- COMMAND:stream(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[MAX_PLAYERS], url[MAX_PLAYERS];
- if(sscanf(params, "s[500]", url)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /stream [url].mp3");
- format(string, sizeof(string), "%s have been stream the music to all players online.", IsPlayerName(playerid));
- SendClientMessageToAll(0xFFFF00FF, string);
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- PlayAudioStreamForPlayer(i, url);
- }
- }
- else SendClientMessage(playerid, 0xCC0000FF, "You must be a rcon administrator to use this command.");
- return 1;
- }
- COMMAND:music(playerid, params[])
- {
- new string[MAX_PLAYERS], url[MAX_PLAYERS];
- if(sscanf(params, "s[500]", url)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /music [url].mp3");
- format(string, sizeof(string), "You have been stream the music %s", url);
- SendClientMessage(playerid, 0xFFFF00FF, string);
- PlayAudioStreamForPlayer(playerid, url);
- return 1;
- }
- COMMAND:shh(playerid, params[])
- {
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
- stock IsPlayerName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment