open.mp forum
[Pawn] HELP! How to Make Moving, Running, Text Draw With Box ? - 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] HELP! How to Make Moving, Running, Text Draw With Box ? (/showthread.php?tid=2126)



HELP! How to Make Moving, Running, Text Draw With Box ? - PutuSuhartawan - 2021-06-21

Ilustration :?youtube.com/watch?v=8-laOTcqCj0


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - Radical - 2021-06-22

To update the textdraw position, you need to create and destroy it each time and increase Y.

You can do it with a timer.



EDIT:



You can also use?TextDrawSetPosition from SKY.inc


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - PutuSuhartawan - 2021-06-23

(2021-06-22, 08:08 AM)Radical Wrote: To update the textdraw position, you need to create and destroy it each time and increase Y.

You can do it with a timer.



EDIT:



You can also use?TextDrawSetPosition from SKY.inc



Can i have the sample script?create and destroy it each time and increase Y sir?


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - Radical - 2021-06-23

Not tested.

Code:
new td_timer_id;

new Float:td_x_amount;

new Text:Textdraw;



forward TextdrawMove();



main() {

? ? Textdraw = TextDrawCreate(0.0, 430.0, "This is an example textdraw");

? ? td_timer_id = SetTimer("TextdrawMove", 100, true);

}



public TextdrawMove() {



? ? td_x_amount = 10.0;



? ? if(td_x_amount >= 644.0)

? ? ? ? td_x_amount = 0.0;



? ? TextDrawDestroy(Textdraw);

? ? Textdraw = TextDrawCreate(td_x_amount, 430.0,?"This is an example textdraw");



? ? foreach(new i: Player)

? ? ? ? TextDrawShowForPlayer(i, Textdraw);

}



RE: HELP! How to Make Moving, Running, Text Draw With Box ? - Pinch - 2021-06-24

SKY/YSF would be better as you are not creating/deleting things from the pool but sending the (position) update packets (which is MUCH better on O(n) / O(1) things)


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - PutuSuhartawan - 2021-06-24

(2021-06-24, 11:16 AM)Pinch Wrote: SKY/YSF would be better as you are not creating/deleting things from the pool but sending the (position) update packets (which is MUCH better on O(n) / O(1) things)

Did you mean adding new plugin sir?


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - Pinch - 2021-06-25

(2021-06-24, 07:06 PM)PutuSuhartawan Wrote:
(2021-06-24, 11:16 AM)Pinch Wrote: SKY/YSF would be better as you are not creating/deleting things from the pool but sending the (position) update packets (which is MUCH better on O(n) / O(1) things)

Did you mean adding new plugin sir?



Yes indeed, SKY/YSF adds missing functions (the functions we already were supposed to have by default) so yeah :)


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - PutuSuhartawan - 2021-06-25

(2021-06-25, 08:22 AM)Pinch Wrote: Yes indeed, SKY/YSF adds missing functions (the functions we already were supposed to have by default) so yeah :)



Can i have it at github sir?


RE: HELP! How to Make Moving, Running, Text Draw With Box ? - Pinch - 2021-06-26

How hard is it google "YSF sa-mp site:github.com"

Anyways

https://github.com/IllidanS4/YSF

https://github.com/IllidanS4/YSF/wiki