Textdraw update - 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: Textdraw update (
/showthread.php?tid=511140)
Textdraw update -
Trynda - 04.05.2014
How can i update textdraw when i excute some cmds,
Changing its color, name, position, etc ?
Re: Textdraw update -
RajatPawar - 04.05.2014
pawn Код:
static Text: myTextDraw
= INVALID_TEXT_DRAW;
public OnGameModeInit
(){ myTextDraw
= TextDrawCreate
("_",
340,
210);
return 1;
}COMMAND:mycommand
(playerid
){ // Use any of the functions from https://sampwiki.blast.hk/wiki/Category:Textdraw to manipulate the textdraw // the ID of the textdraw is stored in the variable 'myTextDraw' // Example TextDrawSetString
(myTextDraw,
"New!");
// Make sure you re-show it for the changes to take effect return 1;
}
Re: Textdraw update -
Trynda - 04.05.2014
Quote:
Originally Posted by RajatPawar
pawn Код:
static Text: myTextDraw = INVALID_TEXT_DRAW; public OnGameModeInit (){ myTextDraw = TextDrawCreate ("_", 340, 210); return 1; }COMMAND:mycommand (playerid ){ // Use any of the functions from https://sampwiki.blast.hk/wiki/Category:Textdraw to manipulate the textdraw // the ID of the textdraw is stored in the variable 'myTextDraw' // Example TextDrawSetString (myTextDraw, "New!"); return 1; }
|
Thank you!