open.mp forum
[Pawn] TextDraw Don't change pos !! ? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] TextDraw Don't change pos !! ? (/showthread.php?tid=1279)



TextDraw Don't change pos !! ? - DaZzY - 2020-10-25

Hello?



the first time i get a problem like that?



i have a TD on my GM and when i change position he don't change he stay RIGHT and don't move even when i change X Y to 9999.999 999. 999?



Quote:g_Player[playerid][td_fuel] = CreatePlayerTextDraw(playerid,288.500000, 483.588916, "Fuel: 100");

? ? PlayerTextDrawBackgroundColor(playerid,g_Player[playerid][td_fuel],0x00000033);?

? ? PlayerTextDrawFont(playerid,g_Player[playerid][td_fuel],3);

? ? PlayerTextDrawLetterSize(playerid,g_Player[playerid][td_fuel],0.000000, 0.733946);

? ? PlayerTextDrawColor(playerid,g_Player[playerid][td_fuel],0x000000ff);?

? ? TextDrawSetShadow(playerid,g_Player[playerid][td_fuel],3);





And i search if maybe i have create same and no ...


RE: TextDraw Don't change pos !! ? - DaZzY - 2020-10-25

Anyone know what problem of this ???


RE: TextDraw Don't change pos !! ? - Josh - 2020-10-26

You need to re-show the textdraw to the player.


RE: TextDraw Don't change pos !! ? - DaZzY - 2020-10-26

How can you give me example please ?


RE: TextDraw Don't change pos !! ? - Expert* - 2020-10-26

https://www.open.mp/docs/scripting/functions/TextDrawShowForPlayer



Do TextDrawShowForPlayer( playerid, g_Player[playerid][td_fuel] ); to show "updated pos".



Quote:TIP



If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible.




except that you can't change TD pos at all, there is no function for that.

You have to destroy existing one, create new and show it...


RE: TextDraw Don't change pos !! ? - Pinch - 2020-10-26

(2020-10-26, 10:15 AM)Expert* Wrote: https://www.open.mp/docs/scripting/functions/TextDrawShowForPlayer



Do TextDrawShowForPlayer( playerid, g_Player[playerid][td_fuel] ); to show "updated pos".



Quote:TIP



If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible.




except that you can't change TD pos at all, there is no function for that.

You have to destroy existing one, create new and show it...

Oooor just use YSF 8)