06.01.2013, 14:59
pawn Код:
#define DIALOG_MUSIC2 45232
pawn Код:
COMMAND:playmusic(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_MUSIC2, DIALOG_STYLE_LIST, "Choose a song", "Sandstorm - Darude\nDanza Kuduro - Don Omar\nDragon Born - Headhunterz\nKill For Lies - Ulrik Munther\nLabrinth Ft. Emeli Sande - Beneath Your Beautiful\nDon't Laugh At Me - Mark Wills\nA1 - Caught In The Middle\nA1 - Don't Wanna Lose You Again\nEminem - Like Toy Soldiers\nEminem - Mocking Bird\nEminem - Talking To My self\nAkon - Don't Matter", "Select", "Close");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MUSIC2)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
// Give them the weapon
if(listitem == 0) // They selected the first item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Darude%20-%20Sandstorm.mp3");
}
if(listitem == 1) // They selected the second item - AK-47
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Don%20Omar%20-%20Danza%20Kuduro%20ft.%20Lucenzo.mp3");
}
if(listitem == 2) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Headhunterz%20-%20Dragonborn%20(Official%20Videoclip).mp3");
}
if(listitem == 3) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Ulrik%20Munther%20-%20Kill%20for%20Lies%20(with%20Lyrics).mp3");
}
if(listitem == 4) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Labrinth%20ft.%20Emeli%20Sande%20-%20Beneath%20Your%20Beautiful.mp3");
}
if(listitem == 5) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Mark%20Wills%20-%20Don't%20Laugh%20At%20Me.mp3");
}
if(listitem == 6) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/A1%20-%20Caught%20In%20The%20Middle.mp3");
}
if(listitem == 7) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/A1%20-%20Don't%20wanna%20lose%20you%20again%20(LYRICS).mp3");
}
if(listitem == 8) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Eminem%20-%20Like%20Toy%20Soldiers.mp3");
}
if(listitem == 9) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Eminem%20-%20Mockingbird.mp3");
}
if(listitem == 10) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/eminem%20-%20talking%20to%20my%20self%20(official%20music).mp3");
}
if(listitem == 11) // They selected the third item - Desert Eagle
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/18961700/Akon%20-%20Don't%20Matter.mp3");
}
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
pawn Код:
C:\Users\fravag\Desktop\Server 0.3e\pawno\include\YSI\internal\..\y_scriptinit.inc(91) : warning 209: function "SSCANF_OnFilterScriptInit" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.