• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] TextDraw Don't change pos !! ?
#1
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 ...
  Reply
#2
Anyone know what problem of this ???
  Reply
#3
You need to re-show the textdraw to the player.
  Reply
#4
How can you give me example please ?
  Reply
#5
https://www.open.mp/docs/scripting/funct...wForPlayer



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...
  Reply
#6
(2020-10-26, 10:15 AM)Expert* Wrote: https://www.open.mp/docs/scripting/funct...wForPlayer



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)
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Forum Jump: