Dialog PM system help.
#1

Hi there.

Iґve been trying to create a dialog PM system. But unfortunately, the should-be receiver doesnt get any message box. Why?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmdtext, "/pm", true))
  {
    ShowPlayerDialog(playerid,755,DIALOG_STYLE_INPUT,"Private Message System","Enter the receiverґs ID or name","Done","Cancel");
    return 1;
  }
  return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  new recid;
  new s1[94],s2[94],name[20];
  if(dialogid == 755)
  {
    recid = strval(inputtext);
    ShowPlayerDialog(playerid,756,DIALOG_STYLE_INPUT,"Private Message System","Enter the text you want to send:","Done","Cancel");
    return 1;
  }
  if(dialogid == 756)
  {
        GetPlayerName(recid, name, sizeof(name));
        format(s1, sizeof(s1), "You have received a new PM from %s\n\n%s",name,inputtext);
        format(s2, sizeof(s2), "New PM from %s (%d)",name,recid);
        ShowPlayerDialog(recid,757,DIALOG_STYLE_MSGBOX,s2,s1,"Reply","Cancel");
    return 1;
  }
  if(dialogid == 757)
  {
        GetPlayerName(recid, name, sizeof(name));
        format(s1, sizeof(s1), "You have received a reply from %s\n\n%s",name,inputtext);
        format(s2, sizeof(s2), "New reply from %s (%d)",name,recid);
        ShowPlayerDialog(recid,757,DIALOG_STYLE_MSGBOX,s2,s1,"Reply","Cancel");
    return 1;
  }
  return 0;
}
Reply


Messages In This Thread
Dialog PM system help. - by Striker_Moe - 06.11.2009, 11:00
Re: Dialog PM system help. - by Gergo1352 - 06.11.2009, 12:21

Forum Jump:


Users browsing this thread: 1 Guest(s)