How can I make so invalid symbol's can't be used
#1

How can I make so invalid symbol's can't be used.

so if someone was to type something like

" , . # ~ ' ;

etc.. does anyone know how to check if text has them symbols.
Reply
#2

Use This :
Код:
public OnPlayerText(playerid, text[])
{
    if (text[0] == '#')
  	{
		SendClientMessage(playerid,COLOR_RED,"Invalid Symbol");
		return 0;
	}
	return 1;
}
Reply
#3

so would that block out if someone typed, My gangname#

?
Reply
#4

Quote:
Originally Posted by Shady91
so would that block out if someone typed, My gangname#

?
no , in that case use :
Код:
public OnPlayerText(playerid, text[])
{
    for(new s = 0; s < 128; s++) 
    {
    if (text == '#')
  	{
		SendClientMessage(playerid,COLOR_RED,"Invalid Symbol");
		return 0;
	}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)