SA-MP Forums Archive
textdraw problem - 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 problem (/showthread.php?tid=198027)



textdraw problem - The_Gangstas - 11.12.2010

ok when i use the cmd to set the textdraw's string, the textdraw it shows a red text saying "lol" then hides the textdraw

pawn Код:
new Text:AnnounceTextDraw;
new Announced=0;
//ongamemodeinit
pawn Код:
TextDrawDestroy(AnnounceTextDraw);
//one second timer
pawn Код:
if(Announced >= 1)Announced --;
        if(Announced == 0){
            Announced =0;
            TextDrawHideForAll(AnnounceTextDraw);
        }
pawn Код:
CMD:announce(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] == 0) return 0;
    new NewAnn[110];
    if(sscanf(params, "s[110]", NewAnn)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: /Announce <text>");

    TextDrawSetString(AnnounceTextDraw,NewAnn);
    TextDrawShowForAll(AnnounceTextDraw);
    Announced = 7;
    return 1;
}
pawn Код:
AnnounceTextDraw = TextDrawCreate(315.000000, 210.000000, "Announcement");
    TextDrawAlignment(AnnounceTextDraw, 2);
    TextDrawBackgroundColor(AnnounceTextDraw, 255);
    TextDrawFont(AnnounceTextDraw, 3);
    TextDrawLetterSize(AnnounceTextDraw, 0.529999, 2.499999);
    TextDrawColor(AnnounceTextDraw, -1);
    TextDrawSetOutline(AnnounceTextDraw, 1);
    TextDrawSetProportional(AnnounceTextDraw, 1);



Re: textdraw problem - iggy1 - 11.12.2010

It must be something else in your code causing the problem if it displays "lol" because that word isn't in the code you posted. Also a little pointless code there like the second timer "if(Announced == 0) Announced =0;" (pointless).


Re: textdraw problem - The_Gangstas - 11.12.2010

ok changed it to
pawn Код:
if(Announced >= 2)Announced --;
        if(Announced == 1){
            Announced =0;
            TextDrawHideForAll(AnnounceTextDraw);
        }
but now its showing the red text ( its showing w/e i type for params now) then hides after about 500 miliseconds


Re: textdraw problem - The_Gangstas - 16.12.2010

bump still inneed of this.