forbidden names
#9

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
@Roel : You should create your array with a dynamic size

PHP код:

new InvalidNames[][20] = 
{
   
"bitch""noob""rage""ass" // You can add as many words as you want
};
public 
OnPlayerText(playeridtext[])
{
   for(new 
fw 0fw sizeof(InvalidNames); fw++)
   {
      if(
strfind(textInvalidNames[fw], true) != -1)
      {
         new 
replacement[20], replacement1[20], pos[2];
         
pos[0] = strfind(textInvalidNames[fw], true);
         
pos[1] = strfind(text' 'truepos[0]);
         
strmid(replacementtextpos[0], pos[1]);
         
strdel(textpos[0], pos[1]);
         for(new 
0strlen(replacement); i++)
         {
             if(
replacement[i] != '*'replacement[i] = '*';
          }
          
strins(textreplacementpos[0]);
      }
      return 
0;

It should work.
Yes well you can remove the 2 indeed,
not sure why you had to copy this and add the onplayertext code with it, but whatever.
Reply


Messages In This Thread
forbidden names - by TheSimpleGuy - 07.05.2014, 06:40
Re: forbidden names - by DaniceMcHarley - 07.05.2014, 08:09
Re: forbidden names - by TheSimpleGuy - 07.05.2014, 08:18
Re: forbidden names - by Laure - 07.05.2014, 08:21
Re: forbidden names - by Roel - 07.05.2014, 09:08
Re : forbidden names - by S4t3K - 07.05.2014, 09:23
Re: forbidden names - by TheSimpleGuy - 07.05.2014, 09:25
Re : forbidden names - by S4t3K - 07.05.2014, 09:27
Re: Re : forbidden names - by Roel - 07.05.2014, 09:27

Forum Jump:


Users browsing this thread: 1 Guest(s)