A Dialog Question?
#2

Once a person enters text in to a dialog input box, the callback OnDialogResponse is called. You can use the dialog ID you specified (1) to track the response. Like so:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    if(dialogid == 1) {
        // 'inputtext' contains the value of what the person entered in to your dialog.
        // since you want an integer (number), you need to strval the value
        new iNumber = strval(inputtext);
        // now we'll deal with checking if what the person entered is OK
        if(iNumber == 1234) {
            SendClientMessage(playerid, -1, "blablabla"); // the message you wanted
        } else return SendClientMessage(playerid, -1, "blublublu"); // the message returned if the person didn't enter 1234 into the message box
    }
   
    return 0;
}
Reply


Messages In This Thread
A Dialog Question? - by lawonama - 22.07.2011, 13:59
Re: A Dialog Question? - by Calgon - 22.07.2011, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)