TextDraw
#1

Hi,

Can I center a textdraw?
Reply
#2

Yes. changing the position.

I would recommend this for you: http://bsndesign.webs.com/tde.htm or https://sampforum.blast.hk/showthread.php?tid=290640
Reply
#3

Yes, but is a textdraw with a text changing
Reply
#4

I made this for You:

pawn Код:
new Text:w_text;

new w_text_remove;

public OnGameModeInit()
{
   
    w_text = TextDrawCreate(320.500000,150.000000,"  ");
    TextDrawAlignment(w_text, 2);
    TextDrawBackgroundColor(w_text, 0x000000ff);
    TextDrawFont(w_text, 3);
    TextDrawLetterSize(w_text, 0.640000,2.0);
    TextDrawColor(w_text, 0xffffffff);
    TextDrawSetOutline(w_text, 1);
    TextDrawSetProportional(w_text, 1);
    TextDrawSetShadow(w_text, 0);

return 1;
}

stock w_textUpdate(playerid, w_text[])
{
        new name[MAX_PLAYER_NAME+1];
        GetPlayerName(playerid, name, sizeof(name));
        new string[128];
        format(string,128,"%s", w_text);
        TextDrawSetString(AText, string);
        TextDrawShowForAll(w_text);
        return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    //w_text
    if(dialogid == 1501 && response == 1)
    {
           new string[128];
           format(string, sizeof(string),"~w~%s", inputtext);
           w_textUpdate(playerid, string);
           KillTimer(w_text_remove);
           w_text_remove = SetTimerEx("w_text_r", 7000, false, "i", playerid);

    }
return 0;
}
pawn Код:
// A command to change (update) the "w_text".
    if (strcmp("/w_text", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 1501 , DIALOG_STYLE_INPUT, "{00ADFF}w_text", "Enter the new text here below:", "Done", "Cancel");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)