Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Includes
- #include <audio>
- // New Stuff
- new Radio[MAX_PLAYERS];
- // Public Stuff
- public Audio_OnClientConnect(playerid)
- {
- new string[128];
- format(string, sizeof(string), "Audio client ID %d connected", playerid);
- SendClientMessageToAll(COLOR_YELLOW, string);
- // Transfer the audio pack when the player connects
- Audio_TransferPack(playerid);
- return 1;
- }
- public Audio_OnClientDisconnect(playerid)
- {
- new string[128];
- format(string, sizeof(string), "Audio client ID %d disconnected", playerid);
- SendClientMessageToAll(COLOR_YELLOW, string);
- Audio_Stop(playerid, Radio[playerid]);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/startradio",true)==0)
- {
- Radio[playerid] = Audio_PlayStreamed(playerid, "http://109.169.26.79:8036/home.html",false,false,false);
- Audio_SetVolume(playerid, Radio[playerid], 100);
- SendClientMessage(playerid,COLOR_YELLOW,"You Have Been Connected to Serious Life Roleplay.");
- return 1;
- }
- if(strcmp(cmdtext, "/stopradio",true)==0)
- {
- Audio_Stop(playerid, Radio[playerid]);
- SendClientMessage(playerid,COLOR_YELLOW,"You Have Been Disconnected From Serious Life Roleplay.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement