[Ajuda] Nome_Sobrenome, Como retirar?!
#1

Boa noite, estou com um problema no nick ao entrar,o jogador й automaticamente kikado se nгo colocar um segundo
nome. gostaria tambйm que ao entrar houvesse diferenciaзхes de tamanho exemplo:
se eu colocar NICK com letras maiъsculas o jogador entra como conta registrada
se um ouro jogador entrar como Nick de apenas uma letra maiъsculas ira aparecer a mesma conta do outro.
nгo quero que isto ocorra e nгo encontro algo correto falando do assunto. se alguйm puder ajudar ficarei grato.

Код:
    if(IsPlayerNPC(playerid)){SpawnPlayer(playerid);return true;}
   	IPlog(playerid);
	if(strfind(PlayerName(playerid), "_", true) == -1 || strfind(PlayerName(playerid), "[", true) != -1 || strfind(PlayerName(playerid), "]", true) != -1 || strfind(PlayerName(playerid), "lixo", true) != -1 || strfind(PlayerName(playerid), "buceta", true) != -1 || strfind(PlayerName(playerid), "caralho", true) != -1 || strfind(PlayerName(playerid), "[", true) != -1 || strfind(PlayerName(playerid), "server", true) != -1
	|| strfind(PlayerName(playerid), "servidor", true) != -1 || strfind(PlayerName(playerid), "crash", true) != -1 || strfind(PlayerName(playerid), "bpl", true) != -1 || strfind(PlayerName(playerid), "gamerx", true) != -1 || strfind(PlayerName(playerid), "[", true) != -1 || strfind(PlayerName(playerid), "189", true) != -1 || strfind(PlayerName(playerid), "201", true) != -1 || strfind(PlayerName(playerid), "200", true) != -1 || strfind(PlayerName(playerid), ".", true) != -1
	|| strfind(PlayerName(playerid), "*", true) != -1 || strfind(PlayerName(playerid), "(", true) != -1 || strfind(PlayerName(playerid), ")", true) != -1 || strfind(PlayerName(playerid), "@", true) != -1 || strfind(PlayerName(playerid), "amx", true) != -1 || strfind(PlayerName(playerid), "prn", true) != -1 || strfind(PlayerName(playerid), "__", true) != -1){
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк Foi Kickado por usar algum nome incorreto!");
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu nome deve ser no formato Nome_Sobrenome Ex: Guru_Josh");
	SendClientMessage(playerid, COLOR_LIGHTBLUE, "Troque-o e volte, Obrigado.");
 	format(gstring,64,"Contas/%s.ini",PlayerName(playerid));Kick(playerid);fremove(gstring);return true;}
Reply
#2

PHP код:
if(IsPlayerNPC(playerid))
{
    
SpawnPlayer(playerid);
    return 
true;
}
IPlog(playerid);
if(
strfind(PlayerName(playerid), "lixo"true) != -|| strfind(PlayerName(playerid), "buceta"true) != -|| strfind(PlayerName(playerid), "caralho"true) != -|| strfind(PlayerName(playerid), "server"true) != -1
|| strfind(PlayerName(playerid), "servidor"true) != -|| strfind(PlayerName(playerid), "crash"true) != -|| strfind(PlayerName(playerid), "bpl"true) != -|| strfind(PlayerName(playerid), "gamerx"true) != -|| || strfind(PlayerName(playerid), "189"true) != -|| strfind(PlayerName(playerid), "201"true) != -|| strfind(PlayerName(playerid), "200"true) != -||
|| 
strfind(PlayerName(playerid), "*"true) != -|| strfind(PlayerName(playerid), "@"true) != -|| strfind(PlayerName(playerid), "amx"true) != -|| strfind(PlayerName(playerid), "prn"true) != -1)
{
    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Vocк Foi Kickado por usar algum nome incorreto!");
    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Troque-o e volte, Obrigado.");
     
format(gstring,64,"Contas/%s.ini",PlayerName(playerid));
    
Kick(playerid);
    
fremove(gstring);
    return 
true;
 } 
Reply
#3

yNexus Obrigado pelo cуdigo, porem ocorreu os seguintes erros:

Код:
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6724) : error 029: invalid expression, assumed zero
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6724 -- 6725) : error 029: invalid expression, assumed zero
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : warning 215: expression has no effect
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : error 001: expected token: ";", but found ")"
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Tenta Agora

PHP код:
if(IsPlayerNPC(playerid))
{
    
SpawnPlayer(playerid);
    return 
true;
}
IPlog(playerid);
if(
strfind(PlayerName(playerid), "lixo"true) != -|| strfind(PlayerName(playerid), "buceta"true) != -|| strfind(PlayerName(playerid), "caralho"true) != -|| strfind(PlayerName(playerid), "server"true) != -||
strfind(PlayerName(playerid), "servidor"true) != -|| strfind(PlayerName(playerid), "crash"true) != -|| strfind(PlayerName(playerid), "bpl"true) != -|| strfind(PlayerName(playerid), "gamerx"true) != -|| strfind(PlayerName(playerid), "189"true) != -||
strfind(PlayerName(playerid), "201"true) != -|| strfind(PlayerName(playerid), "200"true) != -|| strfind(PlayerName(playerid), "*"true) != -|| strfind(PlayerName(playerid), "@"true) != -|| strfind(PlayerName(playerid), "amx"true) != -|| strfind(PlayerName(playerid), "prn"true) != -1)
{
    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Vocк Foi Kickado por usar algum nome incorreto!");
    
SendClientMessage(playeridCOLOR_LIGHTBLUE"Troque-o e volte, Obrigado.");
    
format(gstring,64,"Contas/%s.ini",PlayerName(playerid));
    
Kick(playerid);
    
fremove(gstring);
    return 
true;
 } 
Reply
#5

Quote:
Originally Posted by protork
Посмотреть сообщение
yNexus Obrigado pelo cуdigo, porem ocorreu os seguintes erros:

Код:
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6724) : error 029: invalid expression, assumed zero
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6724 -- 6725) : error 029: invalid expression, assumed zero
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : warning 215: expression has no effect
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : error 001: expected token: ";", but found ")"
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6725) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
#define COLOR_LIGHTBLUE 0xFFFFFFAA
    if(strfind(GetPlayerNameEx(playerid), "lixo", true) != -1 || strfind(GetPlayerNameEx(playerid), "buceta", true) != -1 || strfind(GetPlayerNameEx(playerid), "caralho", true) != -1
    || strfind(GetPlayerNameEx(playerid), "server", true) != -1 || strfind(GetPlayerNameEx(playerid), "servidor", true) != -1 || strfind(GetPlayerNameEx(playerid), "crash", true) != -1
    || strfind(GetPlayerNameEx(playerid), "bpl", true) != -1 || strfind(GetPlayerNameEx(playerid), "gamerx", true) != -1 || strfind(GetPlayerNameEx(playerid), "189", true) != -1
    || strfind(GetPlayerNameEx(playerid), "201", true) != -1 || strfind(GetPlayerNameEx(playerid), "200", true) != -1 || strfind(GetPlayerNameEx(playerid), "*", true) != -1
    || strfind(GetPlayerNameEx(playerid), "@", true) != -1 || strfind(GetPlayerNameEx(playerid), "amx", true) != -1 || strfind(GetPlayerNameEx(playerid), "prn", true) != -1)
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк Foi Kickado por usar algum nome incorreto!");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Troque-o e volte, Obrigado.");
        format(gstring, 64,"Contas/%s.ini", GetPlayerNameEx(playerid));
        Kick(playerid);
        fremove(gstring);
        return 1;
    }


stock GetPlayerNameEx(playerid)
{
    new pname_[24];
    GetPlayerName(playerid, pname_, 24);
    return pname_;
}
Reply
#6

yNexus obrigado novamente, agora compilou normalmente e foi resolvido o problema do nome_sobrenome.
Dieguinho obrigado a vocк tambйm mas seu cуdigo deu 12 erros aqui nas quais nгo faзo ideia do que seja.

Код:
C:\Users\LUCAS&~1\Desktop\BNJ\pawno\include\streamer.inc(305) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6542) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6547) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6720) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6726) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6729) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6737) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6740) : error 079: inconsistent return types (array & non-array)
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6744) : error 029: invalid expression, assumed zero
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6744) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6748) : error 090: public functions may not return arrays (symbol "Streamer_OnPlayerConnect")
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(6750) : warning 225: unreachable code
C:\Users\Lucas & yasmin\Desktop\BNJ\gamemodes\BNJ.pwn(7199) : error 079: inconsistent return types (array & non-array)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.
irei dar uma olhada com calma depois nestes erros para saber do que se trata, apesar dos nick continuarem com
a diferenзa eu jб fico feliz por nao ter que entrar mais com nome_sobrenome.
a ajuda foi de importвncia, obrigado aos que ajudaram.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)