SA-MP Forums Archive
Textdraw Dinero Banco - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Textdraw Dinero Banco (/showthread.php?tid=251958)



Textdraw Dinero Banco - JoNaDo18 - 29.04.2011

Muy buenas, estoy intentando poner debajo del dinero, el dinero que hay en el banco, con el mismo color y todo, en otra web en un post encontre un codigo, pero lo he puesto y no se visualiza nada, este es el codigo:

PD: El codigo lo pongo debajo de OnPlayerSpawn:

new TextineroText[MAX_PLAYERS];

DineroText[playerid] = TextDrawCreate(498.000000,97.000000,"~g~$00000000" );
TextDrawAlignment(DineroText[playerid],0);
TextDrawBackgroundColor(DineroText[playerid],0x000000ff);
TextDrawFont(DineroText[playerid],3);
TextDrawLetterSize(DineroText[playerid],0.599999,2.399999);
TextDrawColor(DineroText[playerid],0xffffffff);
TextDrawSetOutline(DineroText[playerid],1);
TextDrawSetProportional(DineroText[playerid],1);
TextDrawSetShadow(DineroText[playerid],1);

A ver si me comentais que falla aqui porque no veo nada mal . Gracias por todo. Saludos.


Respuesta: Textdraw Dinero Banco - Daniel-92 - 29.04.2011

pawn Код:
new Text:DineroText[MAX_PLAYERS];

    public OnPlayerConnect(playerid)
    {
        DineroText[playerid] = TextDrawCreate(498.000000,97.000000,"~g~$00000000");
        TextDrawAlignment(DineroText[playerid],0);
        TextDrawBackgroundColor(DineroText[playerid],0x000000ff);
        TextDrawFont(DineroText[playerid],3);
        TextDrawLetterSize(DineroText[playerid],0.599999,2.399999);
        TextDrawColor(DineroText[playerid],0xffffffff);
        TextDrawSetOutline(DineroText[playerid],1);
        TextDrawSetProportional(DineroText[playerid],1);
        TextDrawSetShadow(DineroText[playerid],1);
        TextDrawShowForPlayer(playerid,DineroText[playerid]); //esto te falataba
    }



Respuesta: Textdraw Dinero Banco - Jose_grana - 29.04.2011

Es Redweb?

Si es asi busca ...

public BancoA()
{
for(new i; i < MAX_PLAYERS; i++)
{
new string[64]; format(string, sizeof(string), "~w~$%d", PlayerInfo[i][pAccount] );
TextDrawSetString(BalanceTextDraw[i], string );
}
}
Esto seria el color ~w~ lo cambias por otro y listo


Re: Textdraw Dinero Banco - TheGarfield - 29.04.2011

pawn Код:
public OnGameModeInit()
{
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            DineroText[i] = TextDrawCreate(498.000000,97.000000,"~g~$00000000");
            TextDrawAlignment(DineroText[i],0);
            TextDrawBackgroundColor(DineroText[i],0x000000ff);
            TextDrawFont(DineroText[i],3);
            TextDrawLetterSize(DineroText[i],0.599999,2.399999);
            TextDrawColor(DineroText[i],0xffffffff);
            TextDrawSetOutline(DineroText[i],1);
            TextDrawSetProportional(DineroText[i],1);
            TextDrawSetShadow(DineroText[i],1);
            TextDrawShowForPlayer(playerid,DineroText[i]); //esto te falataba
        }
    }
    return true;
}
public OnPlayerUpdate(playerid)
{
    static iGato[50];
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i))
        {
            format(iGato, sizeof(iGato),"%d",su_variable_Banco);
            TextDrawSetString(DineroText[i], iGato);
            TextDrawShowForPlayer(playerid, DineroText[i]);
        }
    }
    return true;
}