[FilterScript] Einstein's Audio Filterscript
#1

Einstein's Audio Filterscript

Features:

Global Playing
Global Stopping
Playing for yourself only
Stopping music for yourself only
Streaming Dialog


Commands:
pawn Код:
CMD:audiohelp(playerid,params[])
{
    SendClientMessage(playerid, BLUE, "List of commands for Einstein's Audio Filterscript:");
    SendClientMessage(playerid, YELLOW, "/audiohelp, /play, /stop, /urlplay, /streamlist");
    SendClientMessage(playerid, GREEN, "Administration Commands: /gstop, /gurlplay, /gplay");
    SendClientMessage(playerid, YELLOW, "For a list of songs, please use /music");
    return 1;
}
Screenshots:




The Script

pawn Код:
/*

                             _______ _________ _        _______ _________ _______ _________ _
                            (  ____ \\__   __/( (    /|(  ____ \\__   __/(  ____ \\__   __/( (    /|
                            | (    \/   ) (   |  \  ( || (    \/   ) (   | (    \/   ) (   |  \  ( |
                            | (__       | |   |   \ | || (_____    | |   | (__       | |   |   \ | |
                            |  __)      | |   | (\ \) |(_____  )   | |   |  __)      | |   | (\ \) |
                            | (         | |   | | \   |      ) |   | |   | (         | |   | | \   |
                            | (____/\___) (___| )  \  |/\____) |   | |   | (____/\___) (___| )  \  |
                            (_______/\_______/|/    )_)\_______)   )_(   (_______/\_______/|/    )_)

                                         _______           ______  _________ _______
                                        (  ___  )|\     /|(  __  \ \__   __/(  ___  )
                                        | (   ) || )   ( || (  \  )   ) (   | (   ) |
                                        | (___) || |   | || |   ) |   | |   | |   | |
                                        |  ___  || |   | || |   | |   | |   | |   | |
                                        | (   ) || |   | || |   ) |   | |   | |   | |
                                        | )   ( || (___) || (__/  )___) (___| (___) |
                                        |/     \|(_______)(______/ \_______/(_______)
                                       
                            oooooooooo.                    oooo                    oooo
                            `888'   `Y8b                   `888                    `888
                             888     888 oooo    ooo        888  .ooooo.   .oooo.o  888 .oo.
                             888oooo888'  `88.  .8'         888 d88' `88b d88(  "8  888P"Y88b
                             888    `88b   `88..8'          888 888   888 `"Y88b.   888   888
                             888    .88P    `888'           888 888   888 o.  )88b  888   888
                            o888bood8P'      .8'        .o. 88P `Y8bod8P' 8""888P' o888o o888o
                                         .o..P'         `Y888P
                                         `Y8P'

                            oooooooooooo  o8o                           .              o8o
                            `888'     `8  `"'                         .o8              `"'
                             888         oooo  ooo. .oo.    .oooo.o .o888oo  .ooooo.  oooo  ooo. .oo.
                             888oooo8    `888  `888P"Y88b  d88(  "8   888   d88' `88b `888  `888P"Y88b
                             888    "     888   888   888  `"Y88b.    888   888ooo888  888   888   888
                             888       o  888   888   888  o.  )88b   888 . 888    .o  888   888   888
                            o888ooooood8 o888o o888o o888o 8""888P'   "888" `Y8bod8P' o888o o888o o888o

*/



#include <a_samp>
#include <sscanf2>
#include <zcmd>

// Color Defines.
#define RED 0xFF0000FF
#define GREEN 0x33AA33AA
#define BLUE 0x0000FFFF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xFF8000FF
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COL_ORANGE  "{FF4500}"

new cmdstr[128];
#define MUSIC_URL "www.jeinstein.com/audio" // Define the URL of the web server where music will be stored. (Be sure you specify the folder like i did)
#define SERVERNAME "Pussy Licking Roleplay" // Define your server's name here

// Define your /music command's songs here.
#define music1 "Place a list of songs in your audio folder here!"
#define music2 "Example:"
#define music3 "sex.mp3, pussy.mp3, cunt.mp3, rape.mp3, vagina.mp3"
#define music4 "poundthatpussy.mp3, teens.mp3, imapervert.mp3, pussyagain.mp3"
#define music5 "yougetthepoint.mp3, doithoweveryouwant.mp3, doggystyle.mp3"
#define music6 "So yeah, You get the point."
#define music7 "Just place songs here."
#define music8 ":)"

public OnFilterScriptInit()
{
    print("Audio Filterscript by Josh Einstein has been loaded!");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 6969:
            {
            switch(listitem)
            {
                case 0:
                {
                    SendClientMessage(playerid, RED, "You've started the Audio Streaming of DefJay.de Hiphop Music!");
                    PlayAudioStreamForPlayer(playerid, "http://tuner.defjay.de:80");
                }
                case 1:
                {
                    SendClientMessage(playerid, RED, "You've started the Audio Streaming of DefJay.com Hiphop Music!");
                    PlayAudioStreamForPlayer(playerid, "http://stream.defjay.com");
                }
                case 2:
                {
                    SendClientMessage(playerid, RED, "You've started the Audio Streaming of Base-Radio House Music!");
                    PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=102622");
                }
            }
        }
    }
 }
return 1;
}
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}


CMD:gplay(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
      new URL[250];
      new Fuck[250];
      if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,RED,"USAGE:/globalplay [songname]");
      for(new i=0;i<=40;i++)
      {
         format(Fuck, sizeof(Fuck), "http://%s/%s.mp3", MUSIC_URL, URL);
         PlayAudioStreamForPlayer(i,Fuck);
      }
      SendClientMessage(playerid,GREEN,"You have played a song for all players!");
      format(cmdstr, sizeof(cmdstr), "Administrator{FFFFFF} %s {FF0000}has started the Global Playback of{FFFFFF} %s", PlayerName(playerid), URL);
      SendClientMessageToAll(RED, cmdstr);
      return 1;
    }
    return SendClientMessage(playerid, RED, "You need to be logged into rcon");
}

CMD:play(playerid,params[])
{

    new URL[250];
    new Fuck[250];
    if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,RED,"USAGE:/play [songname]");
    format(cmdstr, sizeof(cmdstr), "You've started Playing {FFFFFF}%s{FF0000} for yourself!", URL);
    SendClientMessage(playerid, RED, cmdstr);
    format(Fuck, sizeof(Fuck), "http://%s/%s.mp3", MUSIC_URL, URL);
    PlayAudioStreamForPlayer(playerid,Fuck);
    return 1;
}

CMD:stop(playerid,params[])
{
    StopAudioStreamForPlayer(playerid);
    SendClientMessage(playerid, RED, "You've stopped the music you were listening to!");
    return 1;
}

CMD:gurlplay(playerid,params[])
{
   if(IsPlayerAdmin(playerid))
   {
      new URL[250];
      if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,RED,"USAGE:/globalurlplay [URL]");
      for(new i=0;i<=40;i++)
      {
         PlayAudioStreamForPlayer(i,URL);
      }
      SendClientMessage(playerid,GREEN,"You have played a song for all players!");
      format(cmdstr, sizeof(cmdstr), "Administrator{FFFFFF} %s {FF0000}has started the Global Playback of{FFFFFF} %s", PlayerName(playerid), URL);
      SendClientMessageToAll(RED, cmdstr);
      return 1;
    }
   return SendClientMessage(playerid, RED, "You need to be logged into rcon");
}

CMD:urlplay(playerid,params[])
{

    new URL[250];
    if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,RED,"USAGE:/urlplay [URL]");
    format(cmdstr, sizeof(cmdstr), "You've started Playing {FFFFFF}%s{FF0000} for yourself!", URL);
    SendClientMessage(playerid, RED, cmdstr);
    PlayAudioStreamForPlayer(playerid,URL);
    return 1;
}

CMD:gstop(playerid,params[])
{
   if(IsPlayerAdmin(playerid))
   {
      for(new i=0;i<=40;i++)
      {
         StopAudioStreamForPlayer(i);
      }
      format(cmdstr, sizeof(cmdstr), "Administrator{FFFFFF} %s {FF0000}has stopped all music!", PlayerName(playerid));
      SendClientMessageToAll(RED, cmdstr);
      return 1;
    }
   return SendClientMessage(playerid, RED, "You need to be logged into rcon");
}

CMD:music(playerid,params[])
{
    format(cmdstr, sizeof(cmdstr), "|____%s List of Music.____|", SERVERNAME);
    SendClientMessage(playerid, BLUE, cmdstr);
    SendClientMessage(playerid, ORANGE, music1);
    SendClientMessage(playerid, ORANGE, music2);
    SendClientMessage(playerid, ORANGE, music3);
    SendClientMessage(playerid, ORANGE, music4);
    SendClientMessage(playerid, ORANGE, music5);
    SendClientMessage(playerid, ORANGE, music6);
    SendClientMessage(playerid, ORANGE, music7);
    SendClientMessage(playerid, ORANGE, music8);
    SendClientMessage(playerid, YELLOW, "For a list of music related commands type /audiohelp");
    return 1;
}

CMD:streamlist(playerid,params[])
{
    ShowPlayerDialog(playerid, 6969, DIALOG_STYLE_LIST, "{FF4500}Einstein's Music Filterscript Stream", "{00CED1}Hiphop ~ DefJay.de Stream \n{00FF22}Hiphop ~ DefJay.com Stream \n{F81414}House ~ Base Radio \n  ", "Stream", "Cancel");
    return 1;
}

CMD:audiohelp(playerid,params[])
{
    SendClientMessage(playerid, BLUE, "List of commands for Einstein's Audio Filterscript:");
    SendClientMessage(playerid, YELLOW, "/audiohelp, /play, /stop, /urlplay, /streamlist");
    SendClientMessage(playerid, GREEN, "Administration Commands: /gstop, /gurlplay, /gplay");
    SendClientMessage(playerid, YELLOW, "For a list of songs, please use /music");
    return 1;
}

CMD:clearchat(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    SendClientMessage(playerid, 0xFFFFFFFF, "");
    return 1;
}
Downloads
http://pastebin.com/ZvfHc2eQ
http://www.mediafire.com/?834dmchw2g37m47

Includes:

ZCMD: https://sampforum.blast.hk/showthread.php?tid=91354

SSCANF2: https://sampforum.blast.hk/showthread.php?tid=120356

Reply
#2

Useless... but not bad.
Reply
#3

its good but u better make something else more usefull
Reply
#4

It's not useless if you're a scripting noob and you like music lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)