[Help]dialog response
#1

Hello,

I've been scripting a dialog that when you excute a CMD it shows up asking you to enter a skin ID, everything is working fine till now except one thing, how do I get the number they entered?
This is what I got so far I hope someone will be able to fix it

Under OnDialogResponse:
pawn Код:
if(response)
{
if(strlen(inputtext)==0) return SCM(playerid,COLOR_LIGHTBLUE,"Skins available:0-299!");
if(/*NUMBER THEY ENTERED HERE*/<0 || /*NUMBER THEY ENTERED HERE*/ > 299) return SCM(playerid,COLOR_LIGHTBLUE,"Skins available:0-299!");
else
{
SetPlayerSkin(playerid,strlen,/*NUMBER THEY ENTERED HERE*/);
GivePlayerMoney(playerid,-150);
new str[90];
format(str,sizeof(str),"You have successfully purchased skin(%i) for 150$!",/*NUMBER THEY ENTERED HERE*/);
SCM(playerid,COLOR_YELLOW,str);
Thanks.
Reply
#2

strval(inputtext)
Reply
#3

Quote:
Originally Posted by dvir174
Посмотреть сообщение
strval(inputtext)
Thank you +1 rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)