Audio Stream, upon logging/regstering
#1

Alright so I'm atempting to play my servers rap song, but I just can't get it up play upon logging in/registering, am I doing something wrong?

pawn Код:
ShowMainMenuDialog(playerid, frame)
{
    new titlestring[64];
    new string[256];

    switch(frame)
    {
        case 1:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Account Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to Dynamic Street's Roleplay %s.\n\n\nCurrent Version: "SERVER_GM_TEXT"  || Latest Update: "LAST_UPDATE"\n\n IP Address:%s\n\nThis Account is registered, you may now login with the password", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PASSWORD,titlestring,string,"Play","Leave");
            PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/wwpotous9cb1ofm/finally.mp3");
        }
        case 2:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Account Registration - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to Dynamic Street's Roleplay, %s.\n\nIP Address: %s\n\nYou may register an account by entering a desired password here:", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_PASSWORD,titlestring,string,"Register","Exit");
            PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/wwpotous9cb1ofm/finally.mp3");
        }
        case 3:
        {
            new ip[32];
            GetPlayerIp(playerid, ip, 32);
            format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
            format(string, sizeof(string), "Welcome to Dynamic Street's Roleplay %s.\n\n\nCurrent Version: "SERVER_GM_TEXT"  || Latest Update: "LAST_UPDATE"\n\n IP Address:%s\n\nThis Account is registered, you may now login with the password", GetPlayerNameEx(playerid),  ip);
            ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PASSWORD,titlestring,string,"Play","Leave");
            PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/wwpotous9cb1ofm/finally.mp3");
        }
    }
}
Reply
#2

Here is the code:
pawn Код:
public OnPlayerConnect(playerid)
{
     PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/wwpotous9cb1ofm/finally.mp3");
     return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
     StopAudioStreamForPlayer(playerid);
     return 1;
}
this should work
Reply
#3

That just causes errors - I believe I'm using the wrong dropbox link, possible?

I've had it before when I was using it with ************ but that was about 4-6 months ago.
Reply
#4

Show me the errors
Reply
#5

Edit: fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)