Portal SAMP
[Ajuda] Urgente!! - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Urgente!! (/showthread.php?tid=1493)



Urgente!! - welmateus - 05/08/2021

Galera to com um problema, depois de certo tempo online e com varias pessoas, do nada o servidor da um RT, aparece que tem gente on-line e fica retornando essa mensagem no console do server.
Código:
Kicking x.x.x.x.x because they didn't logon to the game.
e o samp-server nao crasha nem nada, o servidor so parece congelar.
Alguem tem ideia do que pode ser?


RE: Urgente!! - xbruno1000x - 05/08/2021

Pode ser problemas no mysql, looping infinito... põe um crashdetect pra rodar e ver se ele encontra algo.


RE: Urgente!! - welmateus - 05/08/2021

pode ser q esteja desatualizado o mysql?


RE: Urgente!! - xbruno1000x - 05/08/2021

(05/08/2021 10:53)welmateus Escreveu: pode ser q esteja desatualizado o mysql?

Não sei te afirmar, mas você pode testar. Eu vi que isso ocorre quando o plugin MySQL perde a conexão com a database. O motivo você vai ter que dar uma caçada...


RE: Urgente!! - welmateus - 05/08/2021

(05/08/2021 11:10)xbruno1000x Escreveu:
(05/08/2021 10:53)welmateus Escreveu: pode ser q esteja desatualizado o mysql?

Não sei te afirmar, mas você pode testar. Eu vi que isso ocorre quando o plugin MySQL perde a conexão com a database. O motivo você vai ter que dar uma caçada...
Código:
if(IsPlayerInAnyVehicle(playerid) && CintoPlayer[playerid] == 0 && !IsAMoto(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid)))
{
new Float:TempVidaCarro,Float:Px,Float:Py,Float:Pz;
    GetVehicleHealth(GetPlayerVehicleID(playerid), TempVidaCarro);
    new Float:Difference = floatsub(VidaCarro[playerid], TempVidaCarro);
      if((floatcmp(VidaCarro[playerid], TempVidaCarro) == 1) && (floatcmp(Difference,100.0) == 1))
    {
    GetPlayerPos(playerid, Px, Py, Pz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
      SetPlayerPos(playerid,Px,Py,Pz+0.2);
        Difference = floatdiv(Difference, 10.0);
        new Float:VidaOld;
        GetPlayerHealth(playerid, VidaOld);
        SetPlayerHealth(playerid, floatsub(VidaOld, Difference));
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,0xFFFF00FF,"[AVISO]: Cuidado voce esta sem cinto, pode acabar morrendo");
SetTimerEx("ANIM", 5000, false, "i", playerid);
    }
    VidaCarro[playerid] = TempVidaCarro;
}
else
{
  VidaCarro[playerid] = 0.0;
    }
Isso em onplayerupdate pode causar isso?


RE: Urgente!! - ProKillerPa - 05/08/2021

Coloca o plugin crashdetect pra rodar e assim que o erro ocorrer novamente, voce vê se acusa algo no log. Se sim, voce manda pra nós aqui

Abraços


RE: Urgente!! - xbruno1000x - 05/08/2021

(05/08/2021 11:12)welmateus Escreveu:
(05/08/2021 11:10)xbruno1000x Escreveu:
(05/08/2021 10:53)welmateus Escreveu: pode ser q esteja desatualizado o mysql?

Não sei te afirmar, mas você pode testar. Eu vi que isso ocorre quando o plugin MySQL perde a conexão com a database. O motivo você vai ter que dar uma caçada...
Código:
if(IsPlayerInAnyVehicle(playerid) && CintoPlayer[playerid] == 0 && !IsAMoto(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid)))
{
new Float:TempVidaCarro,Float:Px,Float:Py,Float:Pz;
    GetVehicleHealth(GetPlayerVehicleID(playerid), TempVidaCarro);
    new Float:Difference = floatsub(VidaCarro[playerid], TempVidaCarro);
      if((floatcmp(VidaCarro[playerid], TempVidaCarro) == 1) && (floatcmp(Difference,100.0) == 1))
    {
    GetPlayerPos(playerid, Px, Py, Pz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
      SetPlayerPos(playerid,Px,Py,Pz+0.2);
        Difference = floatdiv(Difference, 10.0);
        new Float:VidaOld;
        GetPlayerHealth(playerid, VidaOld);
        SetPlayerHealth(playerid, floatsub(VidaOld, Difference));
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,0xFFFF00FF,"[AVISO]: Cuidado voce esta sem cinto, pode acabar morrendo");
SetTimerEx("ANIM", 5000, false, "i", playerid);
    }
    VidaCarro[playerid] = TempVidaCarro;
}
else
{
  VidaCarro[playerid] = 0.0;
    }
Isso em onplayerupdate pode causar isso?

No máximo vai causar lag. Coloque o crashdetect e veja o que ocorre próximo ao momento do bug.