FirstName_Lastname..problem
#10

use this code... put there in the exactly way it is here.

most problem this code is not working well, cause you got a "return" before it, that's why i'm telling you to let this whole code alone on onplayerconnect.
pawn Код:
public OnPlayerConnect(playerid)
{
    static name[MAX_PLAYER_NAME],i = 0,u,bool:fail[MAX_PLAYERS];
    GetPlayerName(playerid, name, sizeof name);
    u = strlen(name);
    for(; i < u; ++i)
    {
       if(name[i] == '_')
       {
          i--;
          if('a' >= name[i] <= 'z' || 'A' >= name[i] <= 'Z')
          {
             i+= 2;
             if('a' >= name[i] <= 'z' || 'A' >= name[i] <= 'Z')
             {
                 fail[playerid] = false;
                 break;
             }
          }
       }
       fail[playerid] = true;
    }
    if(fail[playerid] == true)
    {
       SendClientMessage(playerid,-1, "Your name isґnt a RP format.");
       Kick(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
FirstName_Lastname..problem - by Akcent_Voltaj - 29.08.2012, 19:22
Re: FirstName_Lastname..problem - by lamarr007 - 29.08.2012, 19:24
Re: FirstName_Lastname..problem - by Akcent_Voltaj - 29.08.2012, 23:10
Re: FirstName_Lastname..problem - by leonardo1434 - 29.08.2012, 23:27
Re: FirstName_Lastname..problem - by Akcent_Voltaj - 29.08.2012, 23:47
Re: FirstName_Lastname..problem - by Dubya - 29.08.2012, 23:52
Re: FirstName_Lastname..problem - by ZBits - 29.08.2012, 23:52
Re: FirstName_Lastname..problem - by Akcent_Voltaj - 29.08.2012, 23:55
Re: FirstName_Lastname..problem - by Akcent_Voltaj - 30.08.2012, 00:06
Re: FirstName_Lastname..problem - by leonardo1434 - 30.08.2012, 00:07

Forum Jump:


Users browsing this thread: 3 Guest(s)