Dialog help.
#1

Is there any tutorial on how Dialog input text box's work? i need to add some to my server.

Any link is appreciated.
Reply
#2

Код:
if(!strcmp(cmdtext, "/example", true))
{
  SendClientMessageToAll(0xDEEE20FF, "Somebody was typed /example");
  ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "HEADER", "TEXT HERE", "OK", "Cancle");
  return 1;
}
Reply
#3

Aha, i see what you done there.

But now, i need it, so aka:

You typed in : 10 and pressed ok

so it would do the following

Sexlevel[playerid] = 10; -- (is it inputtext) or what?


like /sex [AMOUNT] - the AMOUNT is classed as money
new money;
Sexlevel = money;

Reply
#4

you need box where you can write something?

then make this

Код:
if(!strcmp(cmdtext, "/example", true))
{
  SendClientMessageToAll(0xDEEE20FF, "Somebody was type /example");
  ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT
, "HEADER", "Put your text downhere", "Ok", "Cancle");
  return 1;
}
and this somewhere in script

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  
  if(dialogid == 0 && response) 
  {
    
    switch(listitem)
    {
      case 0:
      {
        //do something here
      }
     }
   }
   return 1;
}
Reply
#5

is
Код:
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT
the dialogid == 0 ?

And would that work? what would i do, would the final text be classed as 'inputtext' or what?
Reply
#6

no srry dont do this
Код:
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT
put this

Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT
Reply
#7

Can you give me an example of a text input box.

And when you type in a number [AKA 300000]

it sets your money to 300,000 - That's literally what im looking for, but i will ofc edit it!

Thanks so much if you could do this. - Then i'd learn what inputtext dialog boxes do :P
Reply
#8

srry i dont have time now, put new topic...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)