Jump to content
  • 0

pomoc Kreditka


Lothros

Dotaz

Varování jsou tato :

 

C:\Users\Ondrasw\Desktop\Desert Live\gamemodes\dl.pwn(1615) : warning 225: unreachable code
C:\Users\Ondrasw\Desktop\Desert Live\gamemodes\dl.pwn(1615) : warning 217: loose indentation
C:\Users\Ondrasw\Desktop\Desert Live\gamemodes\dl.pwn(2479) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.

 

Rádio takto :

	//--------------------------- Rádio systém
   if(dialogid == DIALOG_RADIO)
   {
       if(response)
       {
           if(listitem == 0)
           {
               PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
           }
           if(listitem == 1)
           {
               PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
           }
           if(listitem == 2)
           {
               PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
           }
       }
       return 1;
}

 

Pomoc prosím, jsem total nováček v Pawnu

Link to comment
Share on other sites

11 odpovědí na tuto otázku

Recommended Posts

  • 0

 

if(dialogid == DIALOG_RADIO)

{

if(response)

{

if(listitem == 0)

{

PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");

}

if(listitem == 1)

{

PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");

}

if(listitem == 2)

{

PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");

}

}

}

return 1;

}

 

 

 

zkus to takhle mělo by to jet ;)

Link to comment
Share on other sites

  • 0

Teď už mám varování jenom jedno

 

C:\Users\Ondrasw\Desktop\Desert Live\gamemodes\dl.pwn(1624) : warning 225: unreachable code

 

Na lajně je toto

 

if(dialogid == DIALOG_RADIO)

 

Celý je toto

 

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//--------------------------- Kreditka
{
   if(dialogid == DIALOG_KREDIT)
   {
       if(response) 
       {
           SendClientMessage(playerid, COLOR_GREEN, "Zakoupil jste si kreditní kartu.");
          	Info[0][kreditka] = 1;
       }
       else 
       {
           SendClientMessage(playerid, COLOR_RED, "Nezakoupil jste si kreditní kartu.");
           Kick(playerid);
       }
       return 1; 
   }

   return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
//--------------------------- Rádio systém
   if(dialogid == DIALOG_RADIO)
{
       if(response)
       {
           if(listitem == 0)
           {
               PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
           }
           if(listitem == 1)
           {
               PlayAudioStreamForPlayer(playerid,"http://ice-06.lagardere.cz/dance-radio320.mp3.m3u");
           }
           if(listitem == 2)
           {
               PlayAudioStreamForPlayer(playerid,"http://dir.xiph.org/listen/3325972/listen.m3u");
           }
       }

       return 1;
}

 

Menší poznámka, když odeberu to s tou kreditkou tak rádia fungujou v pohodě, s tím kódem tak jak to je.

Link to comment
Share on other sites

  • 0
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_KREDIT)
    {
        if(response) 
        {
            SendClientMessage(playerid, COLOR_GREEN, "Zakoupil jste si kreditní kartu.");
               Info[0][kreditka] = 1;
        }
        else 
        {
            SendClientMessage(playerid, COLOR_RED, "Nezakoupil jste si kreditní kartu.");
            Kick(playerid);
        }
        return 1; 
    }

    //--------------------------- Rádio systém
    if(dialogid == DIALOG_RADIO)
    {
        if(response)
        {
            if(listitem == 0)
            {
                PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
            }
            if(listitem == 1)
            {
                PlayAudioStreamForPlayer(playerid,"http://ice-06.lagardere.cz/dance-radio320.mp3.m3u");
            }
            if(listitem == 2)
            {
                PlayAudioStreamForPlayer(playerid,"http://dir.xiph.org/listen/3325972/listen.m3u");
            }
        }
        return 1;
    }
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}

Link to comment
Share on other sites

  • 0

pada to zvycajne ak mas niaky prikaz nedokonceny, zle napisany ale to hodi len error....spadne to ak nedokaze precitat niaky subor alebo prikaz ktory sa viaze so suborom...takze si prebehni vsetky prikazi ktore si v poslednej dobe pisal/robil ale mozem ta ubezpecit ze dialog ktory som ti ja napisal to urcite nesposobuje...pomoct ti mozem este na skype (mas ho v profile) a pozrel sa na mod...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...