[Ajuda] Players Spawnaquando logam outros
#1

Olб pessoal, boa tarde, tudo bem com vocкs?
Gente gostaria de saber a razгo do porque toda vez que um novo player entra em meu servidor, magicamente os que jб estгo spawnam, alguйm sabe dizer o motivo disso acontecer?

Desde jб agradeзo a atenзгo de todo, um forte Abraзo.
Atenciosamente,
Matheus Dorado
Reply
#2

Mostra seu OnPlayerConnect e OnPlayerSpawn
Reply
#3

Eae Blz IlanZ tudo bem?

Segue o que me pediu:
PHP код:
public OnPlayerConnect(playerid)
{
    
//TogglePlayerClock(playerid, 1); //Muda Clima Lentamente
    
return 1;
} 
PHP код:
public OnPlayerSpawn(playerid)
{
    
TogglePlayerSpectating(playerid, 0);
    
SetPlayerSkin(playerid, DOF2_GetInt(OnPlayerAccount(playerid), "Skin"));
    
TextDrawShowForPlayer(playerid, DataC), TextDrawShowForPlayer(playerid, HoraC);
    return 
1;
} 
Eu espawn ele na OnDialogResponse, depois que confirma o login dele eu coloco SpawnPlayer(playerid);

Fico no aguardo, obrigado.
Reply
#4

Peguei o фnibus andando, mas vamo lб... poderia postar o seu dialog do login? onde vocк colocou o SpawnPlayer..
Reply
#5

Opa, sim claro.

Segue Response do Login:
PHP код:
case DIALOG_LOGIN:
        {
            for(new 
a = 0; a < 100; a++)
               {
                 
SendClientMessageToAll(AZUL_CLARO, " * ");
               }
            if(
response == 0)
            {
                
SendClientMessage(playerid, CINZA, "SERVER: Que pena que vocк saiu, caso queira fazer seu Login novamente, digite /logar, ou /quit para sair!");
                
TogglePlayerSpectating ( playerid, 1 ) ;
                return 
1;
            }
            if(
response == 1)
            {
                if(
strcmp(inputtext, DOF2_GetString(OnPlayerAccount(playerid), "Senha"), true) == 0)
                {
                    
SpawnPlayer(playerid);
                    new 
string[120];
                    
format(string, sizeof(string), "[SERVER] Olб %s Seja Bem Vindo Novamente ao Brasil HardForever!", PlayerName(playerid));
                    
SendClientMessage(playerid, CIANO, string);
                    
TimeContas(playerid);
                }
                else
                {
                    if(
tentativas[playerid] == 2)
                    {
                       new 
string[120];
                       
format(string, sizeof(string), "[SERVER] O(A) Player %s foi kickado por excedor o limite de (%d) tentativas de Login!", PlayerName(playerid), tentativas[playerid]+1);
                       
SendClientMessageToAll(0xFF7171AA, string);
                       
KickP(playerid);
                       return 
1;
                    }
                    else
                    {
                        new 
string[120];
                        
tentativas[playerid]++;
                        
format(string, sizeof(string), "[SERVER] ATENCAO! SENHA INCORRETA! Tentativas [%d/3]", tentativas[playerid]);
                        
SendClientMessage(playerid, 0xFF7171AA, string);
                        
format(string, sizeof(string), "Bem Vindo Novamente %s ! \n\nPor favor digite sua senha!\n{FFFFFF}IP: {3AE21D}%s", PlayerName(playerid), PlayerIp(playerid));
                        
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Fazendo seu Login", string,"Logar-se", "Cancelar");
                        
TogglePlayerSpectating ( playerid, 1 ) ;
                    }
                }
                
TogglePlayerSpectating ( playerid, 1 ) ;
                return 
1;
            }
        } 
Nгo coloquei a entrada pq й sу a dialog que manda para o Response.

Fico no aguardo, Vlw Galera
Reply
#6

O que й TimeContas(playerid)?
Reply
#7

Olha, a princнpio nгo achei nada estranho (posso estar errado), mas achei curioso isso:

PHP код:
TimeContas(playerid); 
pode postar aqui essa sua funзгo?

@edit: Postamos juntos IlanZ, mals!
Reply
#8

Este Time nada mais й que uma contagem para nгo bugar o player, depois que ele loga faz essa contagem para carregar as informaзхes do player sу isso.
Reply
#9

Nгo tem um SpawnPlayer nesse loop? se tiver pode ser que toda a vez que alguйm loga, carrega esse TimeContas e dб spawn em todos...
Reply
#10

Jб resolvi kkk Vlw Gente abraзo, foi uma cagadinha aqui de limparcchat com spawn mas tudo resolvido kkkk
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)