Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] TextDraw Don't change pos !! ?

 
  • 0 Vote(s) - 0 Average
Pawn TextDraw Don't change pos !! ?
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#1
2020-10-25, 06:43 PM
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 ...
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#2
2020-10-25, 08:44 PM
Anyone know what problem of this ???
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#3
2020-10-26, 12:08 AM
You need to re-show the textdraw to the player.
DaZzY
Offline

Burgershot Member
Posts: 74
Threads: 12
Joined: Oct 2020
Reputation: 2
#4
2020-10-26, 02:44 AM
How can you give me example please ?
Expert*
Offline

Burgershot Member
Posts: 61
Threads: 2
Joined: Apr 2019
Reputation: 4
#5
2020-10-26, 10:15 AM (This post was last modified: 2020-10-26, 10:22 AM by Expert*.)
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...
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#6
2020-10-26, 10:34 AM
(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)
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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode