SA-MP Forums Archive
textdraw in middle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: textdraw in middle (/showthread.php?tid=261645)



textdraw in middle - bartje01 - 14.06.2011

Hey guys. I want to have the text from announce2 to stay in the middle.
So when I do /ann hello my name is bart,
it remains in the middle.

My command is this:

pawn Код:
COMMAND:ann(playerid,params[])
{
    new text[100];
    if(PlayerInfo[playerid][pAdminLevel] <1) return SendClientMessage(playerid,COLOR_RED,"You're not allowed to use this");
    if(sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/ann [text]");
    TextDrawShowForAll(announce1);
    format(String,sizeof(String),"%s",text);
    TextDrawSetString(announce2, text);
    TextDrawShowForAll(announce2);

    return 1;
}



Re: textdraw in middle - 0ne - 14.06.2011

and? whats the problem


Re: textdraw in middle - bartje01 - 14.06.2011

Ye it's kinda hard to explain. But when I use /ann all my text is going to the right side of the screen.
I want to have the text in the middle. NOw when I type "A" the A is exactly in the middle of the screen. But when I type a sentence like : Hello how are you. Only Hello is in the middle. I want to have the whole sentence in the middle if you know what I mean.

Like this:

Announce
How are you today?



Re: textdraw in middle - bartje01 - 14.06.2011

Solved. IT is the allignment. I had to set it on 2