How can I make so invalid symbol's can't be used - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How can I make so invalid symbol's can't be used (
/showthread.php?tid=141532)
How can I make so invalid symbol's can't be used -
shady91 - 13.04.2010
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.
Re: How can I make so invalid symbol's can't be used -
aircombat - 13.04.2010
Use This :
Код:
public OnPlayerText(playerid, text[])
{
if (text[0] == '#')
{
SendClientMessage(playerid,COLOR_RED,"Invalid Symbol");
return 0;
}
return 1;
}
Re: How can I make so invalid symbol's can't be used -
shady91 - 13.04.2010
so would that block out if someone typed, My gangname#
?
Re: How can I make so invalid symbol's can't be used -
aircombat - 13.04.2010
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;
}