20.02.2014, 15:45
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
and use
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;
}
pawn Код:
if(!IsAllowedNamehuh(inputtext)) return SendClientMessage(playerid, -1, "Ehm sir you typed Invalid characters edit it i beg you.!");