Jump to content
  • 0

pomoc Radio on GTA:SA MP


DxGamer

Dotaz

Ahoj,

Našol som tady na fóre jedno RÁDIO na GTA:SA MP ale nejak nejde urobiť :( Trochu som ho upravil ale aj v základnom tvare to nejde :/

 

SCRIPT:

 

#include <a_samp>
#define DEIALOG_ID 7777
new radiolist[][][] =
{
{"http://icecast3.play.cz/evropa2-128.mp3","Evropa2"},
{"http://www.radia.sk/_radia/stream_playlist/europa2.m3u","Europa2"},
{"http://icecast2.play.cz:8000/HipHopStage128.mp3","HipHopStage"},
{"http://icecast5.play.cz:8000/expres128mp3","ExpresRadio"},
{"http://ice-01.lagardere.cz/web-80.m3u","frekrence1 80"},
{"http://icecast7.play.cz:443/cro1-128.mp3","Radiožurnál"},
{"http://mp3stream4.abradio.cz:8000/fajnblack128.mp3","Fajn Rádio Black"},
{"http://stream.funradio.sk:8000/fun128.mp3.m3u","Fun Radio"},
{"http://81.218.219.203:8000","Pulse Israel"},
{"http://icecast.clickfm.co.il:8002/click2dance","Dance"}
};
new bool:Radio[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
       if(!strcmp(cmdtext,"/radio",true))
{
        new list[500];
        for(new i; i <= sizeof(radiolist); i++)
        {
  if(i == sizeof(radiolist)) format(list,500,"%s\n \n{FF0000}Vypnout!!",list);
  else format(list,500,"%s\n{FAFAFA}%02d) {FF9900}%s",list,i+1,radiolist[i][1]);
        }
 ShowPlayerDialog(playerid,DEIALOG_ID,DIALOG_STYLE_LIST,"{00C8C8}Prosím vyberte stanici",list,"Pustit","Zavřít");
               return 1;
       }
       if(!strcmp(cmdtext,"/radio-all-off",true) && IsPlayerAdmin(playerid))
       {
               for(new i,m=GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i) && Radio[i]) StopAudioStreamForPlayer(i),Radio[i] = false;
               return 1;
       }
       if(!strcmp(cmdtext,"/radioinfo",true)) return SendClientMessage(playerid,0xFFFFFFAA,"Radio List [V0.4] | By: KnightRider");

       if(!strcmp(cmdtext,"/offradio",true))
{
 StopAudioStreamForPlayer(playerid);
 Radio[playerid] = false;
 return 1;
}
return 0;
}
public OnPlayerConnect(playerid) Radio[playerid] = false;
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
if(!response) return 1;
if(dialogid == DEIALOG_ID)
 {
         if(listitem == sizeof(radiolist)) return OnPlayerCommandText(playerid,"/radio");
 if(listitem == sizeof(radiolist)+1) return StopAudioStreamForPlayer(playerid),Radio[playerid] = false;
 StopAudioStreamForPlayer(playerid);
 PlayAudioStreamForPlayer(playerid,radiolist[listitem][0]);
 new str[50]; format(str,50,"Pustil jsis radio \"%s\"...",radiolist[listitem][1]);
 SendClientMessage(playerid,0x33CCFFAA,str);
 SendClientMessage(playerid,0xFFFFFFAA,"vypneš rádio: /offradio");
 Radio[playerid] = true;
 return 1;
}
return 0;
}

 

 

CHYBA

 

 

C:\Users\roman\Desktop\radio.pwn(27) : warning 217: loose indentation
C:\Users\roman\Desktop\radio.pwn(28) : warning 217: loose indentation
C:\Users\roman\Desktop\radio.pwn(43) : warning 217: loose indentation
C:\Users\roman\Desktop\radio.pwn(52) : warning 217: loose indentation
Pawn compiler 3.2.3664     Copyright (c) 1997-2006, ITB CompuPhase


4 Warnings.

 

Link to comment
Share on other sites

9 odpovědí na tuto otázku

Recommended Posts

  • 0

nahoru si hoď #Pragma tabsize 0 (Než někdo něco bude říkat tak jemu to bude jedno jestli to bude mít přehledný nebo ne :) )

A to budu mať tú tabulku alebo ne ? :) lebo ja by som tam chcel tabulku

Link to comment
Share on other sites

  • 0

A to budu mať tú tabulku alebo ne ? :) lebo ja by som tam chcel tabulku

Vše tam budeš mít tak jak máš, díky "#pragma tabsize 0" už ti nebudu skákat warningy kvůli tabování.

Link to comment
Share on other sites

  • 0

Vše tam budeš mít tak jak máš, díky "#pragma tabsize 0" už ti nebudu skákat warningy kvůli tabování.

a to mám dať uplne hore alebo nekde inde pod co alebo nad co to mám dáť ? :d (sorry ale ja som nechápaví) :d
Link to comment
Share on other sites

  • 0

a to mám dať uplne hore alebo nekde inde pod co alebo nad co to mám dáť ? :d (sorry ale ja som nechápaví) :d

Třeba pod Include tady je to prakticky jedno, patří to na stejné místo kam dáváš Define, Include a Newy :)

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...