DIALOG_STYLE_INPUT HELP - 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: DIALOG_STYLE_INPUT HELP (
/showthread.php?tid=617126)
DIALOG_STYLE_INPUT HELP -
Pearson - 16.09.2016
How to create this dialog for only numbers?
Re: DIALOG_STYLE_INPUT HELP -
SyS - 16.09.2016
PHP код:
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
call the function from the dialog response of your dialog while passing inputtext as parameter as in a if statement.If it return 0 return some message from the dialog response to input number.
Re: DIALOG_STYLE_INPUT HELP -
Pearson - 16.09.2016
Can you give me simple please?
Re: DIALOG_STYLE_INPUT HELP -
Pearson - 16.09.2016
I have this error
PHP код:
D:\1-ADMIN-ar cashaloo\Desktop\Samp RP AMX By MySamp.Co.Nr\gamemodes\samprp.pwn(11931) : error 035: argument type mismatch (argument 1)
D:\1-ADMIN-ar cashaloo\Desktop\Samp RP AMX By MySamp.Co.Nr\gamemodes\samprp.pwn(11932) : error 029: invalid expression, assumed zero
D:\1-ADMIN-ar cashaloo\Desktop\Samp RP AMX By MySamp.Co.Nr\gamemodes\samprp.pwn(11933) : error 029: invalid expression, assumed zero
MY CODE
PHP код:
new yj = PlayerInfo[playerid][pSastumro];
if(!IsNumeric(strval(inputtext)){ShowPlayerDialogEx(playerid,9522,DIALOG_STYLE_INPUT, "Bankomati", "Error: Shen Sheiyvane Araswori Simboloebi.\n Gamoiyenet Mxolod Cifrebi.", "Shetana", "Gasvla");}
PlayerInfo[playerid][pSastumrogad] =+ strval(inputtext);
SasInfo[yj][sGadaxdili] =+ strval(inputtext);
format(string,sizeof(string), "INFO: Shen Sheitane Shens Angarishze %d$",strval(inputtext));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string,sizeof(string), "+%d$",strval(inputtext));
GameTextForPlayer(playerid, string, 5000, 1);
Re: DIALOG_STYLE_INPUT HELP -
SyS - 16.09.2016
PHP код:
if(!IsNumeric(inputtext)){ShowPlayerDialogEx(playerid,9522,DIALOG_STYLE_INPUT, "Bankomati", "Error: Shen Sheiyvane Araswori Simboloebi.\n Gamoiyenet Mxolod Cifrebi.", "Shetana", "Gasvla");}
the code should be like that (idk that language but im assuming that you are sending error message in dialog again)