SA-MP Forums Archive
How to make search adress bar? +rep who finds solution - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make search adress bar? +rep who finds solution (/showthread.php?tid=426799)



How to make search adress bar? - LuckyPlaya` - 30.03.2013

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;
}
}


Re: How to make search adress bar? - LuckyPlaya` - 30.03.2013

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;
     }
}



Re: How to make search adress bar? +rep who finds solution - pasha97 - 30.03.2013

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


Re: How to make search adress bar? +rep who finds solution - LuckyPlaya` - 30.03.2013

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