30.10.2011, 15:02
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:
Thanks.
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);