Jump to content
  • 0

pomoc Pomoc s dialogem


TheMulti_CZ

Dotaz

#define FILTERSCRIPT
#define RADIO 15 // Nadefinujte si ID dialogu
#pragma tabsize 0

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptExit()
{
	return 1;
}


#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/radio", cmdtext, true, 6) == 0)
	{
		ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Vyberte si online radio","{00FFFF}Europa 2 - SK\r\n {00FFFF}Europa 2 - CZ\r\n {FF6600}Impuls - CZ\r\n {FF6600}Expres - SK\r\n {FF6699}Funradio - SK\r\n{FF6699} Top 20(Funradio) - SK\r\n {FF6699}Rock(Funradio) - SK \r\n{FF6699}Hip-Hop(Funradio) - SK \r\n{FF6699}Novinky(Funradio) - SK\r\n","Play |>","Stop ||");
		return 1;
	}
	return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == RADIO){
if(response == 0) return StopAudioStreamForPlayer(playerid);
if(response == 1){
if(listitem == 0) return PlayAudioStreamForPlayer(playerid,"http://ice2.europa2.sk/fm-europa2sk-128");
if(listitem == 1) return PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3.m3u");
if(listitem == 2) return PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3.m3u");
if(listitem == 3) return PlayAudioStreamForPlayer(playerid,"http://static.expres.sk/public/data/Playlist/stream/mp3_high.pls");
if(listitem == 4) return PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/fun128.mp3.m3u");
if(listitem == 5) return PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/top20128.mp3.m3u");
if(listitem == 6) return PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/rock128.mp3.m3u");
if(listitem == 7) return PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/hiphop128.mp3.m3u");
if(listitem == 8) return PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/new128.mp3.m3u");
}
}
	return 1;
}
 

Ahoj potřeboval bych pomoct s tímhle dialogem. Když na to kliknu ve hře, tak se nic nestane

Díky za odpověď

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == RADIO)
{
if(response == 0) { StopAudioStreamForPlayer(playerid); return 1; }
if(response == 1){
if(listitem == 0) { PlayAudioStreamForPlayer(playerid,"http://ice2.europa2.sk/fm-europa2sk-128"); return 1; }
if(listitem == 1) { PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3.m3u"); return 1; }
if(listitem == 2) { PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3.m3u"); return 1; }
if(listitem == 3) { PlayAudioStreamForPlayer(playerid,"http://static.expres.sk/public/data/Playlist/stream/mp3_high.pls"); return 1; }
if(listitem == 4) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/fun128.mp3.m3u"); return 1; }
if(listitem == 5) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/top20128.mp3.m3u"); return 1; }
if(listitem == 6) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/rock128.mp3.m3u"); return 1; }
if(listitem == 7) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/hiphop128.mp3.m3u"); return 1; }
if(listitem == 8) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/new128.mp3.m3u"); return 1; }
}}
return 1;
}

 

Link to comment
Share on other sites

  • 0

Špatné odkazy, co jiného jsi čekal?

P.S.: smaž na konci těch odkazů .m3u a mělo by to fungovat

 

 

The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist.
Link to comment
Share on other sites

  • 0


#include <a_samp>

#define FILTERSCRIPT
#define RADIO 15 // Nadefinujte si ID dialogu

#if defined FILTERSCRIPT

public OnFilterScriptExit()
{
    return 1;
}


#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/radio", cmdtext, true, 6) == 0)
    {
        ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Vyberte si online radio","{00FFFF}Europa 2 - SK\r\n{00FFFF}Europa 2 - CZ\r\n{FF6600}Impuls - CZ\r\n{FF6600}Expres - SK\r\n{FF6699}Funradio - SK\r\n{FF6699} Top 20(Funradio) - SK\r\n{FF6699}Rock(Funradio) - SK \r\n{FF6699}Hip-Hop(Funradio) - SK \r\n{FF6699}Novinky(Funradio) - SK","Play |>","Stop ||");
        return 1;
    }
    return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == RADIO)
    {
        if(response == 0) { StopAudioStreamForPlayer(playerid); return 1; }
        if(response == 1)
        {
            if(listitem == 0) { PlayAudioStreamForPlayer(playerid,"http://ice2.europa2.sk/fm-europa2sk-128");  return 1; }
            if(listitem == 1) { PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz:8000/evropa2-128.mp3"); return 1; }
            if(listitem == 2) { PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3.m3u"); return 1; }
            if(listitem == 3) { PlayAudioStreamForPlayer(playerid,"http://85.248.7.162:8000/96.mp3"); return 1; }
            if(listitem == 4) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/fun128.mp3"); return 1; }
            if(listitem == 5) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/top20128.mp3"); return 1; }
            if(listitem == 6) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/rock128.mp3"); return 1; }
            if(listitem == 7) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/hiphop128.mp3"); return 1; }
            if(listitem == 8) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/new128.mp3"); return 1; }
        }
    }
    return 0;
}

 

Edited by sampx
Link to comment
Share on other sites

  • 0


#include <a_samp>

#define FILTERSCRIPT
#define RADIO 15 // Nadefinujte si ID dialogu

#if defined FILTERSCRIPT

public OnFilterScriptExit()
{
    return 1;
}


#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/radio", cmdtext, true, 6) == 0)
    {
        ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Vyberte si online radio","{00FFFF}Europa 2 - SK\r\n{00FFFF}Europa 2 - CZ\r\n{FF6600}Impuls - CZ\r\n{FF6600}Expres - SK\r\n{FF6699}Funradio - SK\r\n{FF6699} Top 20(Funradio) - SK\r\n{FF6699}Rock(Funradio) - SK \r\n{FF6699}Hip-Hop(Funradio) - SK \r\n{FF6699}Novinky(Funradio) - SK","Play |>","Stop ||");
        return 1;
    }
    return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == RADIO)
    {
        if(response == 0) { StopAudioStreamForPlayer(playerid); return 1; }
        if(response == 1)
        {
            if(listitem == 0) { PlayAudioStreamForPlayer(playerid,"http://ice2.europa2.sk/fm-europa2sk-128");  return 1; }
            if(listitem == 1) { PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz:8000/evropa2-128.mp3"); return 1; }
            if(listitem == 2) { PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3."); return 1; }
            if(listitem == 3) { PlayAudioStreamForPlayer(playerid,"http://85.248.7.162:8000/96.mp3"); return 1; }
            if(listitem == 4) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/fun128.mp3"); return 1; }
            if(listitem == 5) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/top20128.mp3"); return 1; }
            if(listitem == 6) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/rock128.mp3"); return 1; }
            if(listitem == 7) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/hiphop128.mp3"); return 1; }
            if(listitem == 8) { PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/new128.mp3"); return 1; }
        }
    }
    return 0;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...