15.08.2015, 07:50
lol :lllll leme teach you ![Cheesy](images/smilies/biggrin.png)
1. make the define and command for show dialog **** if you want it dialog
****
now the command:
now we make the response D:
![Cheesy](images/smilies/biggrin.png)
1. make the define and command for show dialog **** if you want it dialog
![Tongue](images/smilies/razz.gif)
Код:
#define DIALOG_RADIO 3000
PHP код:
CMD:radio(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Welcome to Radio", "Song 1 Name\nSong 2 Name\nSong 3 name\nSong 4 Name\nSong 5 Name\nSong 6 Name\n{FF0000}Stop Radio", "Select", "Cancel");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RADIO)
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 5)
{
PlayAudioStreamForPlayer(playerid, "url");
}
if(listitem == 6)
{
PlayAudioStreamForPlayer(playerid,"Radio Stoped");
}
return 1;
}
}
return 0;
}