How to make search adress bar? +rep who finds solution
#1

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;
}
}
Reply
#2

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;
     }
}
Reply
#3

When you put "rep+" to your topic title, people ignore it
Reply
#4

I will remove it. I just need help. PS:didnt know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)