• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] HELP! How to Make Moving, Running, Text Draw With Box ?
#1
Ilustration :?youtube.com/watch?v=8-laOTcqCj0
  Reply
#2
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
  Reply
#3
(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?
  Reply
#4
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);

}
  Reply
#5
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)
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
#6
(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?
  Reply
#7
(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 :)
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
#8
(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?
  Reply
#9
How hard is it google "YSF sa-mp site:github.com"

Anyways

https://github.com/IllidanS4/YSF

https://github.com/IllidanS4/YSF/wiki
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: