No desaparecen texts draws y por lo tanto se mezclan [ayuda]
#1

Hola descargue este fs, el problema esta en que al usar /gmx pues los texts draws se mezclan...he intentado con todo pero no desparecen...intentenlo ustedes hise que en OnFilterScriptExit desaparecieran pero no da resultado :/

pawn Код:
/*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
    _/
   _/_/_/    _/    _/
  _/    _/  _/    _/
 _/    _/  _/    _/
_/_/_/      _/_/_/
               _/
          _/_/

    _/      _/  _/_/_/  _/      _/    _/_/    _/_/_/_/_/    _/_/
   _/_/  _/_/    _/    _/_/    _/  _/    _/      _/      _/    _/
  _/  _/  _/    _/    _/  _/  _/  _/_/_/_/      _/      _/    _/
 _/      _/    _/    _/    _/_/  _/    _/      _/      _/    _/
_/      _/  _/_/_/  _/      _/  _/    _/      _/        _/_/

*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*/

#include <a_samp>
#pragma tabsize 0
#include <progress>

enum minato
{
    Experiencia
};
new Info[MAX_PLAYERS][minato];

new Bar:BarraExperiencia[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
new Bar:BarraFondoRango[MAX_PLAYERS];
new Text:txtRango[MAX_PLAYERS];
new Text:txtRangoNovato[MAX_PLAYERS];
new Text:txtRangoAsesino[MAX_PLAYERS];
new Text:txtRangoSuicida[MAX_PLAYERS];
new Text:txtRangoMafioso[MAX_PLAYERS];
new Text:txtRangoTerrorista[MAX_PLAYERS];
new Text:txtRangoSoldado[MAX_PLAYERS];
new Text:txtRangoLoco[MAX_PLAYERS];
new Text:txtRangoSuperSaiyajin[MAX_PLAYERS];
new Text:txtRangoMasterPro[MAX_PLAYERS];
new Text:txtNumeroExperiencia[MAX_PLAYERS];

public OnFilterScriptInit()
{
    new playerid;
    for (playerid = 0; playerid < GetMaxPlayers(); playerid ++)
    {
       
    TextDrawBackgroundColor(txtRango[playerid], 255);
    TextDrawFont(txtRango[playerid], 2);
    TextDrawLetterSize(txtRango[playerid], 0.310000, 0.899999);
    TextDrawColor(txtRango[playerid], -1);
    TextDrawSetOutline(txtRango[playerid], 0);
    TextDrawSetProportional(txtRango[playerid], 1);
    TextDrawSetShadow(txtRango[playerid], 1);

    txtNumeroExperiencia[playerid] = TextDrawCreate(255.000000, 400.000000, " ");
    TextDrawBackgroundColor(txtNumeroExperiencia[playerid], 255);
    TextDrawFont(txtNumeroExperiencia[playerid], 2);
    TextDrawLetterSize(txtNumeroExperiencia[playerid], 0.409999, 1.000000);
    TextDrawColor(txtNumeroExperiencia[playerid], -1);
    TextDrawSetOutline(txtNumeroExperiencia[playerid], 1);
    TextDrawSetProportional(txtNumeroExperiencia[playerid], 1);

    txtRangoNovato[playerid] = TextDrawCreate(292.000000, 386.000000, "NOVATO");
    TextDrawBackgroundColor(txtRangoNovato[playerid], 255);
    TextDrawFont(txtRangoNovato[playerid], 1);
    TextDrawLetterSize(txtRangoNovato[playerid], 0.450000, 1.000000);
    TextDrawColor(txtRangoNovato[playerid], -65281);
    TextDrawSetOutline(txtRangoNovato[playerid], 0);
    TextDrawSetProportional(txtRangoNovato[playerid], 1);
    TextDrawSetShadow(txtRangoNovato[playerid], 1);

    txtRangoAsesino[playerid] = TextDrawCreate(291.000000, 386.000000, "ASESINO");
    TextDrawBackgroundColor(txtRangoAsesino[playerid], 255);
    TextDrawFont(txtRangoAsesino[playerid], 1);
    TextDrawLetterSize(txtRangoAsesino[playerid], 0.470000, 1.000000);
    TextDrawColor(txtRangoAsesino[playerid], -65281);
    TextDrawSetOutline(txtRangoAsesino[playerid], 0);
    TextDrawSetProportional(txtRangoAsesino[playerid], 1);
    TextDrawSetShadow(txtRangoAsesino[playerid], 1);

    txtRangoSuicida[playerid] = TextDrawCreate(291.000000, 386.000000, "SUICIDA");
    TextDrawBackgroundColor(txtRangoSuicida[playerid], 255);
    TextDrawFont(txtRangoSuicida[playerid], 1);
    TextDrawLetterSize(txtRangoSuicida[playerid], 0.470000, 1.000000);
    TextDrawColor(txtRangoSuicida[playerid], -65281);
    TextDrawSetOutline(txtRangoSuicida[playerid], 0);
    TextDrawSetProportional(txtRangoSuicida[playerid], 1);
    TextDrawSetShadow(txtRangoSuicida[playerid], 1);

    txtRangoMafioso[playerid] = TextDrawCreate(287.000000, 386.000000, "MAFIOSO");
    TextDrawBackgroundColor(txtRangoMafioso[playerid], 255);
    TextDrawFont(txtRangoMafioso[playerid], 1);
    TextDrawLetterSize(txtRangoMafioso[playerid], 0.470000, 1.000000);
    TextDrawColor(txtRangoMafioso[playerid], -65281);
    TextDrawSetOutline(txtRangoMafioso[playerid], 0);
    TextDrawSetProportional(txtRangoMafioso[playerid], 1);
    TextDrawSetShadow(txtRangoMafioso[playerid], 1);

    txtRangoTerrorista[playerid] = TextDrawCreate(291.000000, 386.000000, "TERRORISTA");
    TextDrawBackgroundColor(txtRangoTerrorista[playerid], 255);
    TextDrawFont(txtRangoTerrorista[playerid], 1);
    TextDrawLetterSize(txtRangoTerrorista[playerid], 0.350000, 1.000000);
    TextDrawColor(txtRangoTerrorista[playerid], -65281);
    TextDrawSetOutline(txtRangoTerrorista[playerid], 0);
    TextDrawSetProportional(txtRangoTerrorista[playerid], 1);
    TextDrawSetShadow(txtRangoTerrorista[playerid], 1);

    txtRangoSoldado[playerid] = TextDrawCreate(289.000000, 386.000000, "SOLDADO");
    TextDrawBackgroundColor(txtRangoSoldado[playerid], 255);
    TextDrawFont(txtRangoSoldado[playerid], 1);
    TextDrawLetterSize(txtRangoSoldado[playerid], 0.450000, 1.000000);
    TextDrawColor(txtRangoSoldado[playerid], -65281);
    TextDrawSetOutline(txtRangoSoldado[playerid], 0);
    TextDrawSetProportional(txtRangoSoldado[playerid], 1);
    TextDrawSetShadow(txtRangoSoldado[playerid], 1);

    txtRangoLoco[playerid] = TextDrawCreate(299.000000, 386.000000, "LOCO");
    TextDrawBackgroundColor(txtRangoLoco[playerid], 255);
    TextDrawFont(txtRangoLoco[playerid], 1);
    TextDrawLetterSize(txtRangoLoco[playerid], 0.540000, 1.000000);
    TextDrawColor(txtRangoLoco[playerid], -65281);
    TextDrawSetOutline(txtRangoLoco[playerid], 0);
    TextDrawSetProportional(txtRangoLoco[playerid], 1);
    TextDrawSetShadow(txtRangoLoco[playerid], 1);

    txtRangoSuperSaiyajin[playerid] = TextDrawCreate(288.000000, 386.000000, "SUPER SAIYAJIN");
    TextDrawBackgroundColor(txtRangoSuperSaiyajin[playerid], 255);
    TextDrawFont(txtRangoSuperSaiyajin[playerid], 1);
    TextDrawLetterSize(txtRangoSuperSaiyajin[playerid], 0.270000, 1.000000);
    TextDrawColor(txtRangoSuperSaiyajin[playerid], -65281);
    TextDrawSetOutline(txtRangoSuperSaiyajin[playerid], 0);
    TextDrawSetProportional(txtRangoSuperSaiyajin[playerid], 1);
    TextDrawSetShadow(txtRangoSuperSaiyajin[playerid], 1);

    txtRangoMasterPro[playerid] = TextDrawCreate(291.000000, 386.000000, "MASTER PRO");
    TextDrawBackgroundColor(txtRangoMasterPro[playerid], 255);
    TextDrawFont(txtRangoMasterPro[playerid], 1);
    TextDrawLetterSize(txtRangoMasterPro[playerid], 0.450000, 1.000000);
    TextDrawColor(txtRangoMasterPro[playerid], -65281);
    TextDrawSetOutline(txtRangoMasterPro[playerid], 0);
    TextDrawSetProportional(txtRangoMasterPro[playerid], 1);
    TextDrawSetShadow(txtRangoMasterPro[playerid], 1);
    BarraFondoRango[playerid] = CreateProgressBar(286.00, 377.00, 75.50, 19.20, 65376, 100.0);
    }




    return 1;
}
public OnPlayerDisconnect(playerid)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    ShowProgressBarForPlayer(playerid,BarraExperiencia[playerid]);
    TextDrawShowForPlayer(playerid,txtNumeroExperiencia[playerid]);
    BarraExperiencia[playerid] = CreateProgressBar(185.00, 399.00, 277.50, 11.19, 16711766, 100.0);
    txtRango[playerid] = TextDrawCreate(301.000000, 376.000000, "Rango MINATO");
    Info[playerid][Experiencia] =0;
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    Info[killerid][Experiencia]++;
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0;

    new Exp;
    Exp = Info[playerid][Experiencia];
    ShowProgressBarForPlayer(playerid,BarraExperiencia[playerid]);
    SetProgressBarValue(BarraExperiencia[playerid],Exp);
    SetProgressBarMaxValue(BarraExperiencia[playerid],1000);
    UpdateProgressBar(BarraExperiencia[playerid],playerid);

    if(Exp >= 0 && Exp <= 30)
    {
        TextDrawShowForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 30 && Exp <= 70)
    {
        TextDrawShowForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 70 && Exp <= 120)
    {
        TextDrawShowForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 120 && Exp <= 200)
    {
        TextDrawShowForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 200 && Exp <= 300)
    {
        TextDrawShowForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 300 && Exp <= 550)
    {
        TextDrawShowForPlayer(playerid,txtRangoSoldado[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 550 && Exp <= 650)
    {
        TextDrawShowForPlayer(playerid,txtRangoLoco[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSoldado[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 650 && Exp <= 800 )
    {
        TextDrawShowForPlayer(playerid,txtRangoSuperSaiyajin[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoLoco[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSoldado[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 800 && Exp <= 1000)
    {
        TextDrawShowForPlayer(playerid,txtRangoMasterPro[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuperSaiyajin[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoLoco[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSoldado[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    if(Exp >= 1000 && Exp <= 99999999)
    {
        TextDrawShowForPlayer(playerid,txtRangoMasterPro[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuperSaiyajin[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoLoco[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSoldado[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoTerrorista[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoMafioso[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoSuicida[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoAsesino[playerid]),
        TextDrawHideForPlayer(playerid,txtRangoNovato[playerid]);
    }

    new Xexperiencia[300];
    format(Xexperiencia, sizeof(Xexperiencia),"~>~EXP: %d/1000~<~",Info[playerid][Experiencia]);
    TextDrawSetString(txtNumeroExperiencia[playerid],Xexperiencia);

    return 1;
}

/*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*/
Por favor ayuda :/
Reply
#2

Has probado poniendo TextDrawDestroy(textdra); en OnFilescriptExit?

P.D: Para no usar tantos texdraws para lo de "Novato" blabla, podrнas usar TextDrawSetString y ahorrar textdraws :P..
Reply
#3

ya he intentado eso..
Reply
#4

pawn Код:
public OnFilterScriptExit()
{
  TextDrawHideForPlayer(...);
  TextDrawDestroy(...);
//...
}
Reply
#5

Eso mismo hise :/ pero solucionado, que mejor solucion que hacerlo 1 mismo hare mi propio sistema diferente a ese...y vere si me animo a postearlo xD
Reply
#6

Este el segundo topic que haces de este mismo tema?

https://sampforum.blast.hk/showthread.php?tid=269571

Me refiero al tema, es el mismo ¬¬
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)