Quote:
Originally Posted by [J]ulian
pawn Код:
static nombre[MAX_PLAYER_NAME]; public OnPlayerConnect(playerid) { GetPlayerName(playerid, nombre, sizeof(nombre)); if(ComprobarNick(nombre)) { SendClientMessage(playerid, -1, "SERVIDOR: No puedes utilizar nъmeros en el nick."); return Kick(playerid); } return 1; }
stock ComprobarNick(cuenta[]) // By: Juliбn. { new chars = strlen(cuenta), nn = 0; for(new c = 0; c < chars; c++) if(cuenta[c] == '1' || cuenta[c] == '2' || cuenta[c] == '3' || cuenta[c] == '3' || cuenta[c] == '4' || cuenta[c] == '5' || cuenta[c] == '6' || cuenta[c] == '7' || cuenta[c] == '8' || cuenta[c] == '9' || cuenta[c] == '0') nn += 1; if(nn != 0) return 1; return 0; }
|
Lo que el decia que detecte que detecte a un jugador cuando el numero es primero que las letras
es lo mismo que gamerx cuando kickea por "-GamerX- 123asd (ID:47) has been automatically kicked as the first character of their name is numeric"
pero cuando entra con nick asd123 no lo kickea