Audio Stream, upon logging/regstering - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Audio Stream, upon logging/regstering (
/showthread.php?tid=470858)
Audio Stream, upon logging/regstering -
James Bob - 20.10.2013
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");
}
}
}
Re: Audio Stream, upon logging/regstering -
DarkLored - 20.10.2013
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
Re: Audio Stream, upon logging/regstering -
James Bob - 20.10.2013
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.
Re: Audio Stream, upon logging/regstering -
DarkLored - 20.10.2013
Show me the errors
Re: Audio Stream, upon logging/regstering -
James Bob - 20.10.2013
Edit: fixed it.