Non RP name help
#2

It is only valid if name contains A-Z, a-z characters and 1 underscore:
pawn Код:
IsValidRPName(const p_name[])
{
    new count_underscore;
    for (new i, j = strlen(p_name); i != j; i++)
    {
        switch (p_name[i])
        {
            case 'A' .. 'Z', 'a' .. 'z': continue;
            case '_': count_underscore++;
            default: return 0;
        }
    }
    return count_underscore == 1;
}
Reply


Messages In This Thread
Non RP name help - by Grimlock - 11.06.2016, 17:05
Re: Non RP name help - by Konstantinos - 11.06.2016, 17:12
Re: Non RP name help - by Luicy. - 11.06.2016, 18:22

Forum Jump:


Users browsing this thread: 1 Guest(s)