Portal SAMP
[Ajuda] TextDraws sumindo - 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] TextDraws sumindo (/showthread.php?tid=4289)



TextDraws sumindo - MisteriumBr - 10/12/2023

galera estava com um problema devido a ter muitas textdraws no servidor, então decidi criar elas apenas quando for utilizar e depois destrui-las, não sei se é uma boa prática, mas estou aberto a sugestões.

sabendo disso, ao abrir e fechar a textdraw por volta de 3 vezes, ela não abre mais, apenas mostra o mouse na tela como se fosse para interagir com uma textdraw mas, aparece apenas o mouse a textdraw fica como se fosse invisivel.

Alguem poderia me ajudar com isso, vou deixar o código abaixo:


Código:
stock DestroyPlayerTDECARRO_CLICK(playerid) {
    for (new i; i < 36; i++) {
       
        PlayerTextDrawDestroy(playerid, PlayerTD[playerid][i]);
   
    }
      
    PlayerTextDrawDestroy(playerid, CARRO_6CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, CARRO_5CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, CARRO_4CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, CARRO_3CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, CARRO_2CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, CARRO_1CLICK[playerid]);
    PlayerTextDrawDestroy(playerid, guardar[playerid]);
    PlayerTextDrawDestroy(playerid, retirar[playerid]);

   
    return 1;
}

Detalhe após sumir a textdraw nenhuma outra abre também apenas o mouse na tela, suponho que esteva atingindo algum limite, mas não entendo como posso estar atingindo limite send oque estou destruindo elas.


RE: TextDraws sumindo - White_Blue - 11/12/2023

Playertextdraws devem ser apenas destruídas ao jogador desconectar.

Se você usa muitas textdraws no seu servidor, recomendo usar o textdraw-streamer: https://github.com/nexquery/samp-textdraw-streamer