Check number
#1

Hi,

how can i check, if the playersname has a number?
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)