Check number - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Check number (
/showthread.php?tid=95564)
Check number -
Justsmile - 04.09.2009
Hi,
how can i check, if the playersname has a number?
Re: Check number - Zeex - 04.09.2009
Loop throught whole player name and check each character until you find some digit
pawn Код:
for (new pos; name[pos] && pos < MAX_PLAYER_NAME; pos++)
{
if ('0' <= name[pos] <= '9')
{
// this symbol is a digit
break;
}
}
Change "name" to your variable containing name which you want to check.