disallow character - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: disallow character (
/showthread.php?tid=626296)
disallow character -
xUnknow - 13.01.2017
Hi How Should I disallow character On One Commands Like When Player Want Use /call [number]
just player can write number not letter and words !
How Should I Do This ?
Sorry For My Bad English !
Re: disallow character -
Sithis - 13.01.2017
You can use a function such as IsNumeric to check if the number is actually a number:
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;
}