dialog input
#1

How do I store a variable into the string of this DIALOG_STYLE_INPUT? I'm pretty confused, I'd appreciate some help.


Just an example code:
PHP код:
CMD:test(playeridparams[])
{
ShowPlayerDialog(playeridTestDIALOG_STYLE_INPUT"Hi""Hello""Ok""Cancel"); // Let's say I'd type "Samp" here in this dialog.
}
return 
1
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])

if(
dialogid==Test && response==1)
{
   
format(stringsizeof string"%s", ); // Here is where I want the "Samp" variable string to be stored in.
}
return 
1;

I hope I made myself clear.
Reply
#2

inputtext holds the text.
Reply
#3

I've heard that before, but can you give me an example on how to use that?
Reply
#4

pawn Код:
format(string, sizeof(string), "%s", inputtext);
Reply
#5

PHP код:
format(stringsizeof(string), "%s"strval(inputtext)); 
Reply
#6

Quote:
Originally Posted by Pearson
Посмотреть сообщение
PHP код:
format(stringsizeof(string), "%s"strval(inputtext)); 
Why would you put that strval even after you saw he has %s and not %d.
Reply
#7

What the hack, it's just 'inputtext' ? lol ok ty, I was thinking way too far.
Sometimes I've got to think simple
Reply
#8

Nevermind this post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)