Change name
#5

Also a user may rename to a name with [TAG] and i don't think you would like that, and yet i like Y_Files plugin works smoothly and avoid many things as i assume such crashes and etc.

you can check if the name doesn't have [TAG] using this stock

pawn Код:
stock IsAllowedNamehuh(const string[])
            {
            new z = 0;
            for(new x, y = strlen(string); x != y; x++)
                {
                if((string[x] >= 48 && string[x] <= 57) || (string[x] >= 65 && string[x] <= 90) || (string[x] >= 97 && string[x] <= 122) || string[x] == '_' || string[x] == ' ')
                    {
                    z++;
                }
            }
            if(z == strlen(string)) return true;
            else return false;
        }
and use
pawn Код:
if(!IsAllowedNamehuh(inputtext)) return SendClientMessage(playerid, -1, "Ehm sir you typed Invalid characters edit it i beg you.!");
Reply


Messages In This Thread
Change name - by alishvasis - 20.02.2014, 15:16
Re: Change name - by xo - 20.02.2014, 15:30
Re: Change name - by Guest4390857394857 - 20.02.2014, 15:38
Re: Change name - by Konstantinos - 20.02.2014, 15:39
Re: Change name - by xo - 20.02.2014, 15:45
Re: Change name - by alishvasis - 20.02.2014, 18:43
Re: Change name - by xo - 20.02.2014, 18:45
Re: Change name - by alishvasis - 20.02.2014, 18:50
Re: Change name - by xo - 20.02.2014, 18:52
Re: Change name - by alishvasis - 20.02.2014, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)