Doesn't work - 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: Doesn't work (
/showthread.php?tid=395868)
Doesn't work -
JaKe Elite - 28.11.2012
Aged:
When i input any numbers it doesn't work.
Some what the number 1 (maybe?) is working. But it is display as 49.
Clothe:
When i input any valid skin id's it doesn't work.
It only work in skin id 299.
Code
pawn Код:
if(strval(inputtext) <= 10 || strval(inputtext) >= 99)
{
pInfo[playerid][Age] = strval(inputtext);
CleanChat(playerid);
format(buf, 129, "So, You are %i years old", inputtext);
SendClientMessage(playerid, COLOR_PURPLE, buf);
ShowPlayerDialog(playerid, Clothe, DIALOG_STYLE_INPUT, "Choose your Clothe", "Clothe Valid 0 up to 299", "Change", "Remain");
}
else
{
ShowPlayerDialog(playerid, Aged, DIALOG_STYLE_INPUT, "What is your Age?", "Age allowed is 10 up to 99\n"red"Error: That age is not allowed in the server! (#ErrorID: 4000)", "Input", "Cancel");
}
return 1;
if(strval(inputtext) <= 0 || strval(inputtext) >= 299)
{
pInfo[playerid][Clothes] = strval(inputtext);
SetPlayerSkin(playerid, strval(inputtext));
CleanChat(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "You can start your own life now!");
}
else
{
ShowPlayerDialog(playerid, Clothe, DIALOG_STYLE_INPUT, "Choose your Clothe", "Clothe Valid 0 up to 299\n"red"Error: That clothe is not valid in the server! (#ErrorID: 4000)", "Change", "Remain");
}
Re: Doesn't work -
Ballu Miaa - 28.11.2012
Change this line
pawn Код:
if(strval(inputtext) <= 10 || strval(inputtext) >= 99)
To
pawn Код:
if(strval(inputtext) >= 10 || strval(inputtext) <= 99)
For second dialog!!
Change this line
pawn Код:
if(strval(inputtext) <= 0 || strval(inputtext) >= 299)
To
pawn Код:
if(strval(inputtext) >= 0 || strval(inputtext) <= 299)
Re: Doesn't work -
JaKe Elite - 28.11.2012
Didn't work..
Now i can insert the 9 years old below..
Re: Doesn't work -
Ballu Miaa - 28.11.2012
Change this:
pawn Код:
if(strval(inputtext) >= 0 || strval(inputtext) <= 299)
with this:
pawn Код:
if(strval(inputtext) >= 0 && strval(inputtext) <= 299)
Same with the other dialog!
Re: Doesn't work -
JaKe Elite - 28.11.2012
Thanks work!!