23.03.2019, 08:27
Okay, found the way, but there is problem..
Im making the command. Dialog style list.
To select a radio and then play it.
But when i type the command, it doesnt show that the command is unknown, it means that this command exists, but cannot execute it somehow.
Here is the code:
And OnDialogResponse:
Im making the command. Dialog style list.
To select a radio and then play it.
But when i type the command, it doesnt show that the command is unknown, it means that this command exists, but cannot execute it somehow.
Here is the code:
Code:
CMD:radio(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Radio:", "NJOY \n More cooming soon", "Choose", "Exit");
return 1;
}
Code:
if(dialogid == DIALOG_RADIO)
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid, "http://46.10.150.243/njoy.mp3");
SendClientMessage(playerid, COLOR_YELLOW, "you are listening to RADIO NJOY!");
}
if(listitem == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "more cooming soon!");
return 1;
}
}
}

