- public OnPlayerConnect(playerid)
- {
- new pname[MAX_PLAYER_NAME], idx, found;
- GetPlayerName(playerid, pname, sizeof pname);
- while(pname[idx])
- {
- if(pname[idx] == '[' || pname[idx] == ']')
- {
- SendClientMessage(playerid, COLOR_RED, "Seu nome não pode conter os seguintes caracteres: [ ]");
- Kick(playerid);
- return 1;
- }
- if(pname[idx] == '_')
- {
- found = 1;
- break;
- }
- idx++;
- }
- if(!found)
- {
- SendClientMessage(playerid, COLOR_RED, "Seu nome precisa estar no formato: Nome_Sobrenome");
- Kick(playerid);
- return 1;
- }
- return 1;
- }
