30.03.2013, 10:25
How can i make some search bar,like when i tipe "Power hitz" and he find me Power hitz station...
I am now using this.
#define DIALOG_MUSIC 999
if(strcmp(cmd, "/setstation", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new pDialog[1024];
strcat(pDialog, "Music Name 1\n", sizeof(pDialog));
strcat(pDialog, "Music name 2\n", sizeof(pDialog));
strcat(pDialog, "Music name 3\n", sizeof(pDialog));
strcat(pDialog, "Musik name 4\n", sizeof(pDialog));
strcat(pDialog, "Musik name 5\n", sizeof(pDialog));
ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Stations List", pDialog, "Select", "Cancel");
return 1;
}
}
if(dialogid == DIALOG_MUSIC)
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=28532");//pink
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283896");//power hitz
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=17082");//zam radio
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid, "");
}
return 1;
}
}
I am now using this.
#define DIALOG_MUSIC 999
if(strcmp(cmd, "/setstation", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new pDialog[1024];
strcat(pDialog, "Music Name 1\n", sizeof(pDialog));
strcat(pDialog, "Music name 2\n", sizeof(pDialog));
strcat(pDialog, "Music name 3\n", sizeof(pDialog));
strcat(pDialog, "Musik name 4\n", sizeof(pDialog));
strcat(pDialog, "Musik name 5\n", sizeof(pDialog));
ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Stations List", pDialog, "Select", "Cancel");
return 1;
}
}
if(dialogid == DIALOG_MUSIC)
{
if(response)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=28532");//pink
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283896");//power hitz
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=17082");//zam radio
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(playerid, "");
}
return 1;
}
}