Define
#1

how to define this ?
Код:
if(strcmp(cmd,"/radio", true) == 0)
{
            ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
            return 1;
    }
Код:
	if(dialogid == 102) //
	{
      if(response)
		 {
      for(new i=0; i<250; i++)
     {
       if(IsPlayerConnected(i))
      {
           PlayAudioStreamForPlayer(i, inputtext);
         }
      }
    }
}
Reply
#2

pawn Код:
#define DIALOGRADIO 1000

if(strcmp(cmd,"/radio", true) == 0)
{
            ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
}

------------------------------------------------------------------------------------------------------------

    if(dialogid == DIALOGRADIO) //
    {
      if(response)
         {
      for(new i=0; i<250; i++)
     {
       if(IsPlayerConnected(i))
      {
           PlayAudioStreamForPlayer(i, inputtext);
         }
      }
    }
}
            return 1;
    }
That's what you were looking for?
Reply
#3

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
#define DIALOGRADIO

if(strcmp(cmd,"/radio", true) == 0)
{
            ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
}

------------------------------------------------------------------------------------------------------------

    if(dialogid == DIALOGRADIO) //
    {
      if(response)
         {
      for(new i=0; i<250; i++)
     {
       if(IsPlayerConnected(i))
      {
           PlayAudioStreamForPlayer(i, inputtext);
         }
      }
    }
}
            return 1;
    }
That's what you were looking for?
I think it's supose to be like this:

Код:
#define DIALOGRADIO 102
Reply
#4

Quote:
Originally Posted by Shetch
Посмотреть сообщение
I think it's supose to be like this:

Код:
#define DIALOGRADIO 102
is correct, I forgot to put the number after the name defined
Reply
#5

no underscore needed !! how u defined it thats how it should be !
pawn Код:
#define RADIODIALOG 84555

if(strcmp(cmd,"/radio", true) == 0)
{
            ShowPlayerDialog(playerid, RADIODIALOG , DIALOG_STYLE_INPUT, "Radio System by GBLTeam","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Okay", "Exit");
}

if(dialogid == RADIODIALOG ) //
{
//rest of code...
return 1;
}
Reply
#6

Thanks, LOCK !
Reply
#7

I Put it in GameMod, AND ISN't WORKING :@@@@@@@@@
Reply
#8

Quote:
Originally Posted by 3RoR
Посмотреть сообщение
I Put it in GameMod, AND ISN't WORKING :@@@@@@@@@
what exactly and how exactly did you put it ?
Reply
#9

Quote:

if(strcmp(cmd,"/radio", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameShark] >= 1)
{
ShowPlayerDialog(playerid, RADIODIALOG , DIALOG_STYLE_INPUT, "Muzika","{FFFFFF}Vnesete go {009BFF}Linkot{FFFFFF} od radio stanicata:", "Ok", "Izlezi");
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"{FF4040}GR ESKA:{FFFFFF}Ne ste Ovlasteni za Ovaa Komanda.");
}
return 1;
}

The Command
Quote:

if(dialogid == RADIODIALOG) //
{
if(response)
{
if(IsPlayerConnected(playerid))
{
PlayAudioStreamForPlayer(playerid, inputtext);
}
return 1;
}
}

the public and on the top defined !
Reply
#10

what do you mean The Command you didt put that code under a command did u ?
it suppost to go likes this
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == RADIODIALOG) //
    {
        if(response)
        {
            if(IsPlayerConnected(playerid))PlayAudioStreamForPlayer(playerid, inputtext);
        }
     }
}
EDIT for that small amount of code to save lines use this
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == RADIODIALOG && response) PlayAudioStreamForPlayer(playerid,inputtext);
}
i dont think u need to check if the players is connect,becouse if he isnt then the callback would call anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)