Showplayerdialog?
#1

Basically.
CMD:blah(playerid,params[]){
PHP код:
if (ShowPlayerDialog(playeridDIALOG_CHECKPINDIALOG_STYLE_INPUT,"Cipher","Please Enter your pin:","Confirm","") == 1){
//wait for DIALOG_CHECKPIN to return 1 or 0;
// do money stuff
}
else if ^
0{
//return an error
}
}
return 
1;

I really don't want to put this into an ondialog response. Since I want to reuse the pincheck callback.
And the ondialogresponse just confirms the pin, returning 1 or 0 depending on the result.
Reply
#2

pawn Код:
CMD:command(playerid,params[])
{
      ShowPlayerDialog(playerid, DIALOG_CHECKPIN, DIALOG_STYLE_INPUT,"Cipher","Please Enter your pin:","Confirm","");
}
Then use the call back

https://sampwiki.blast.hk/wiki/OnDialogResponse

example
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
      if(dialogid = DIALOG_CHECKPIN)
      {
            if(response)
            {
                  //code goes here
             }
             else
             {
     
             }
       }
       return 0;
}
Reply
#3

As stated here:
Код:
I really don't want to put this into an ondialog response. Since I want to reuse the pincheck callback.
And the ondialogresponse just confirms the pin, returning 1 or 0 depending on the result.
Reply
#4

Quote:
Originally Posted by MassDivide
Посмотреть сообщение
As stated here:
Код:
I really don't want to put this into an ondialog response. Since I want to reuse the pincheck callback.
And the ondialogresponse just confirms the pin, returning 1 or 0 depending on the result.
sorry I did not read carefuly, Not sure (not sure if this even works with response)
Reply
#5

Yeah i guess on dialog response it is.
Reply
#6

Quote:
Originally Posted by MassDivide
Посмотреть сообщение
Yeah i guess on dialog response it is.
well mabey you could make a global variable like
pawn Код:
new variable[MAX_PLAYERS];

variable[playerid] = pin;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)