OnPlayerDialog problems
#5

Thanks, I'm fairly new to scripting and I kept trying to get it to work thats why its so sloppy and fucked up.

How can I make it not allow text strings cause I can enter like "lol" and it will say I set my age to 0

I think this...
Код:
if(strlen(inputtext) < 1 && !IsNumeric(inputtext))
{
SendClientMessage(playerid, COLOR_RED, "You must enter a numeric age between 1 and 120 Ex: 56");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Questionare", "Please enter your age", "Continue", "Cancel");
}
Was supposed to stop it but it didn't

My IsNumeric is this if its messed up
Код:
stock IsNumeric(string[])
{
	for (new i = 0, j = strlen(string); i < j; i++)
	{
		if (string[i] > '9' || string[i] < '0') return 0;
	}
	return 1;
}

Reply


Messages In This Thread
OnPlayerDialog problems - by MisterTickle - 18.01.2010, 05:06
Re: OnPlayerDialog problems - by Swistack92 - 18.01.2010, 05:21
Re: OnPlayerDialog problems - by [HiC]TheKiller - 18.01.2010, 05:59
Re: OnPlayerDialog problems - by Calgon - 18.01.2010, 07:27
Re: OnPlayerDialog problems - by MisterTickle - 18.01.2010, 07:52
Re: OnPlayerDialog problems - by Calgon - 18.01.2010, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)