How to config cmd setstation
#1

I don't know how to config this cmd, when I use this cmd, It's doesn't have an music. Example I want to connect this cmd to website mp3.zing.vn, but I don't know where to edit the code.
Quote:

CMDetstation(playerid, params[]) {
if(!IsPlayerInAnyVehicle(playerid)) {
return SendClientMessageEx(playerid, COLOR_GRAD2, "Ban phai o trong xe moi co the su dung lenh nay de nghe nhac.");
}
ShowPlayerDialog(playerid,SETSTATION,DIALOG_STYLE_ LIST,"Radio Menu","Genres\nTop 50 Stations\nSearch\nK-LSR\nNick's Radio\nCustom Audio URL\nTurn radio off","Lua chon", "Dong");
return 1;
}

I Think configure in here, Is it correct ? Please give me a tutorial to config this problem, Thank you
Quote:

else if(dialogid == GENRES)
{
if(response)
{
if(!GetPVarType(playerid, "pHTTPWait"))
{
format(string, sizeof(string), "%s/radio/radio.php?genre=%d", SAMP_WEB, (listitem+1));
SetPVarInt(playerid, "pSelectGenre", (listitem+1));
SetPVarInt(playerid, "pHTTPWait", 1);
HTTP(playerid, HTTP_GET, string, "", "StationListHTTP");
}
else
{
SendClientMessage(playerid, 0xFFFFFFAA, "HTTP Thread is busy");
}
}
else
{
ShowPlayerDialog(playerid,SETSTATION,DIALOG_STYLE_ LIST,"Radio Menu","Genres\nTop 50 Stations\nSearch\nK-LSR\nNick's Radio\nTurn radio off","Select", "Close");
DeletePVar(playerid, "pSelectGenre");
}
}

Reply
#2

like this i think (hope this works)
Quote:

CMDetstation(playerid, params[]) {
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Ban phai o trong xe moi co the su dung lenh nay de nghe nhac.");
ShowPlayerDialog(playerid,SETSTATION,DIALOG_STYLE_ LIST,"Radio Menu","Genres\nTop 50 Stations\nSearch\nK-LSR\nNick's Radio\nCustom Audio URL\nTurn radio off","Lua chon", "Dong");
return 1;
}

and try that cmd
Reply
#3

You configure your station connections under OnDialogRespons like this
Код:
  if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
                case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
                case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
Under case 0 u put the start audio stream command and under case 1 u put the second start audio stream for your second station and so on or u put another dialog for genders and so case 0 wont be your stream audio it will be show player dialog and u modifie that dialog wit the same code I gave u up here but dont forget to change the dialogid == SETSTATION.
Reply
#4

Quote:
Originally Posted by baba1234
Посмотреть сообщение
You configure your station connections under OnDialogRespons like this
Код:
  if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
                case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
                <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTc4NjQyNTQ%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=plantronics_backbeat_go_2" target="_blank" alt="Plantronics BackBeat <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTM4NDM2MTQ%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=GO%202%20%2B%20Charging%20Case" target="_blank" alt="<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTgyMDY0ODM%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO" target="_blank" alt="<a href="http://cityadspix.com/tsclick-FDQCWPPK-JHFDQDB0?url=http%3A%2F%2Fwww.svyaznoy.ru%2Fcatalog%2Faudiovideo%2F8080%2F1634361&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=NTY1LTAtMTQzNTMyNTI0NC0xNTcxMTE1OQ%3D%3D&fid=NDQ1NzU2Nzc1&prdct=350138073304&kw=Plantronics%20BackBeat" target="_blank" alt="Plantronics BackBeat 116" title="Plantronics BackBeat 116" style="">Plantronics BackBeat</a> GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO</a> 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">GO <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTM2MzYwMjM%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=2%20%2B%20Charging%20Case%3C" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">2 + Charging Case<</a>/a>" title="Plantronics BackBeat GO 2 + Charging Case" style="">plantronics_backbeat_go_2</a>_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyMjUtMTE3NjA3NjE%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=plantronics_backbeat_go_2" target="_blank" alt="Plantronics BackBeat <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyMjUtMTgzNTExNjI%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=GO%202%20%2B%20Charging%20Case" target="_blank" alt="<a href="http://cityadspix.com/tsclick-GQBE4OE0-JHFDQUHP?url=http%3A%2F%2Fogo1.ru%2Fmarket%2Fbluetooth_garnitura%2F89616-Bluetooth-garnitura-Plantronics-BackBeat-Go-2-Black-chehol-i-zaryadka&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=OTY1NS0wLTE0MzUzMjUyMjUtMTE0NTI5NzM%3D&fid=NDQ1NzU2Nzc1&prdct=0c390a340230043203&kw=Plantronics%20BackBeat%20GO" target="_blank" alt="<a href="http://cityadspix.com/tsclick-GQBE4OE0-JHFDQUHP?url=http%3A%2F%2Fogo1.ru%2Fmarket%2Fbluetooth_garnitura%2F65381-Bluetooth-garnitura-Plantronics-BackBeat-903&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=OTY1NS0wLTE0MzUzMjUyMjUtMTMzMzI3ODk%3D&fid=NDQ1NzU2Nzc1&prdct=0737033c0c37043203&kw=Plantronics%20BackBeat" target="_blank" alt="Plantronics BackBeat 903+" title="Plantronics BackBeat 903+" style="">Plantronics BackBeat</a> GO" title="Plantronics BackBeat GO" style=""><a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTQ3NDEwMzI%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO</a></a> 2 + Charging Case" title="<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTAwOTgxNDU%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO%202%20%2B%20Charging%20Case" target="_blank" alt="<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTIxMTE3MjQ%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO%202" target="_blank" alt="Plantronics BackBeat <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTA0NjM2OTE%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=GO%202%20%2B%20Charging%20Case" target="_blank" alt="<a href="http://cityadspix.com/tsclick-GQBE4OE0-JHFDQUHP?url=http%3A%2F%2Fogo1.ru%2Fmarket%2Fbluetooth_garnitura%2F89616-Bluetooth-garnitura-Plantronics-BackBeat-Go-2-Black-chehol-i-zaryadka&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=OTY1NS0wLTE0MzUzMjUyNDQtMTE1ODA3ODg%3D&fid=NDQ1NzU2Nzc1&prdct=0c390a340230043203&kw=Plantronics%20BackBeat%20GO" target="_blank" alt="Plantronics BackBeat GO" title="Plantronics BackBeat GO" style="">Plantronics BackBeat GO</a> 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">GO <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTc2OTQyOTQ%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=2%20%2B%20Charging%20Case%3C" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">2 + Charging Case<</a>/a>" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO 2</a> + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO 2 + Charging Case</a>" style="">GO 2 + Charging Case</a>" title="Plantronics BackBeat GO 2 + Charging Case" style=""><a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&im=MjgyNS0wLTE0MzUzMjUyNDQtMTAzNDA1MzE%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=plantronics_backbeat_go_2%3C" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">plantronics_backbeat_go_2<</a>/a>_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUxODItMTIwOTQ4NzE%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTkwODA1NjM%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=plantronics_backbeat_go" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">plantronics_backbeat_go</a>_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyMjUtMTA3OTQ5MTk%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=case%25202" target="_blank" alt="<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTU0NjIyOTY%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO%202" target="_blank" alt="Plantronics BackBeat <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTkwODA1Nzc%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=GO%202%20%2B%20Charging%20Case" target="_blank" alt="<a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTExMjg4NjQ%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=Plantronics%20BackBeat%20GO" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO</a> 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">GO <a href="http://cityadspix.com/tsclick-CQBE4NP0-MKIGQL0P?url=http%3A%2F%2Fwww.pleer.ru%2F_119647_plantronics_backbeat_go_2_black.html&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&bt=20&pt=9&lt=2&tl=3&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&sa=1559&sa2=mh-ts&sa3=&sa4=&sa5=&im=MjgyNS0wLTE0MzUzMjUyNDQtMTgyMjY2MDI%3D&fid=NDQ1NzU2Nzc1&prdct=07330b380832043900&kw=2%20%2B%20Charging%20Case%3C" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">2 + Charging Case<</a>/a>" title="Plantronics BackBeat GO 2 + Charging Case" style="">Plantronics BackBeat GO 2</a> + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">case%202</a>" target="_blank" alt="Plantronics BackBeat GO 2 + Charging Case" title="Plantronics BackBeat GO 2 + Charging Case" style="">case 2</a>: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
Under case 0 u put the start audio stream command and under case 1 u put the second start audio stream for your second station and so on or u put another dialog for genders and so case 0 wont be your stream audio it will be show player dialog and u modifie that dialog wit the same code I gave u up here but dont forget to change the dialogid == SETSTATION.
Can you help me to write a demo script of this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)