[Help]dialog response - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]dialog response (
/showthread.php?tid=293917)
[Help]dialog response -
moadi - 30.10.2011
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.
Re: [Help]dialog response -
dvir174 - 30.10.2011
strval(inputtext)
Re: [Help]dialog response -
moadi - 30.10.2011
Quote:
Originally Posted by dvir174
strval(inputtext)
|
Thank you

+1 rep.