[FilterScript] [FS]RP Name Checker
#1

This function is useful for Role-Play servers. When the player join, it's scans of the players name that complies with the laws of RP.

Pastebin link

Copyright, 2009 Spatrik
Reply
#2

Pictures, how it appears? I think its nice but yeah
Reply
#3

What pictures are needed? It shows only a text on the screen.
Reply
#4

good job, dude
Reply
#5

thx, thx
Reply
#6

Could you explain the people a little bit more? I don't think they'll download or even install it with no information!
Reply
#7

Quote:
Originally Posted by McKinley
Could you explain the people a little bit more? I don't think they'll download or even install it with no information!
What's more to explain? You join the server, and if you don't have a roleplay name you can't play. Simple.
Reply
#8

Like how to install it, for beginers?
Reply
#9

This is just a simple function not filterscript ... and also you are complicating too much.

pawn Code:
stock NameValidator(playerid)
{
  new pname[MAX_PLAYER_NAME],underline=0;
  GetPlayerName(playerid, pname, sizeof(pname));
  if(strfind(pname,"[",true) != (-1)) return 0;
  else if(strfind(pname,"]",true) != (-1)) return 0;
  else if(strfind(pname,"$",true) != (-1)) return 0;
  else if(strfind(pname,"(",true) != (-1)) return 0;
  else if(strfind(pname,")",true) != (-1)) return 0;
  else if(strfind(pname,"=",true) != (-1)) return 0;
  else if(strfind(pname,"@",true) != (-1)) return 0;
  else if(strfind(pname,"1",true) != (-1)) return 0;
  else if(strfind(pname,"2",true) != (-1)) return 0;
  else if(strfind(pname,"3",true) != (-1)) return 0;
  else if(strfind(pname,"4",true) != (-1)) return 0;
  else if(strfind(pname,"5",true) != (-1)) return 0;
  else if(strfind(pname,"6",true) != (-1)) return 0;
  else if(strfind(pname,"7",true) != (-1)) return 0;
  else if(strfind(pname,"8",true) != (-1)) return 0;
  else if(strfind(pname,"9",true) != (-1)) return 0;
  new maxname = strlen(pname);
  for(new i=0; i<maxname; i++)
  {
    if(pname[i] == '_') underline ++;
  }
  if(underline != 1) return 0;
    pname[0] = toupper(pname[0]);
    for(new x=1; x<maxname; x++)
    {
        if(pname[x] == '_') pname[x+1] = toupper(pname[x+1]);
        else if(pname[x] != '_' && pname[x-1] != '_') pname[x] = tolower(pname[x]);
    }
    SetPlayerName(playerid, "New_Name");
    SetPlayerName(playerid, pname);
    return 1;
}
Reply
#10

Wouldn't it be easier to check the valid letters, not the invalid ones?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)