SA-MP Forums Archive
Alert message Textdraw - 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)
+--- Thread: Alert message Textdraw (/showthread.php?tid=332090)



Alert message Textdraw - aNdReSk - 07.04.2012

I'm trying to create an alert message using a generic "warning" text draw I made, the idea is that, player gets it and depending on the message it changes the color and text.

Ex: Player tries to buy an owned car: Send "THIS IS NOT YOUR CAR!" message, in Red color for 5 seconds.

Код:
WarningTextdraw = TextDrawCreate(320.000000, 405.000000, "TEXT");
TextDrawAlignment(WarningTextdraw , 2);
TextDrawBackgroundColor(WarningTextdraw , 255);
TextDrawFont(WarningTextdraw , 2);
TextDrawLetterSize(WarningTextdraw , 0.389999, 1.899999);
TextDrawColor(WarningTextdraw , -16776961);
TextDrawSetOutline(WarningTextdraw , 1);
TextDrawSetProportional(WarningTextdraw , 1);
So my question is, when to update it, when to kill it :P and how to set it so that I can change the color (3 colors, grey, blue, red) and time shown for player ID.



I just ran out of logic


Re: Alert message Textdraw - ViniBorn - 07.04.2012

TextDrawColor + SetTimerEx +TextDrawHideForPlayer +TextDrawShowForPlayer


Re: Alert message Textdraw - Faisal_khan - 07.04.2012

I am not sure if this works I just tried it in a minute. Hope it works.

pawn Код:
WarningTextdraw = TextDrawCreate(320.000000, 405.000000, "TEXT");
TextDrawAlignment(WarningTextdraw , 2);
TextDrawBackgroundColor(WarningTextdraw , 255);
TextDrawFont(WarningTextdraw , 2);
TextDrawLetterSize(WarningTextdraw , 0.389999, 1.899999);
TextDrawColor(WarningTextdraw , -16776961);
TextDrawSetOutline(WarningTextdraw , 1);
TextDrawSetProportional(WarningTextdraw , 1);
TextDrawShowForPlayer(playerid, WarningTextdraw);
SetTimerEx("WarningTextdraw", 5000, false, "is", 1337,);