23.03.2013, 12:45
Well, I wonder why /music is not working... :/ (It's a fliterscript)
Yeah, if this is solved, I will add more songs into it.
I will give +rep if who has helped and solved this problem.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/music", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 69, DIALOG_STYLE_LIST, "Music", "1. Daniel Kim - Pop Danthology 2012\n2. Test", "Play", "Cancel");
return 1;
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0: PlayAudioStreamForPlayer(playerid, "http://racerevolution.cu.cc/music/Daniel%20Kim%20-%20Pop%20Danthology%202012.mp3");
case 1: SendClientMessage(playerid, 0xFF000000, "Testing only!");
}
}
}
}
return 1;
}
