Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] HELP! How to Make Moving, Running, Text Draw With Box ?

 
  • 0 Vote(s) - 0 Average
Pawn HELP! How to Make Moving, Running, Text Draw With Box ?
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#1
2021-06-21, 07:58 PM
Ilustration : youtube.com/watch?v=8-laOTcqCj0
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#2
2021-06-22, 08:08 AM (This post was last modified: 2021-06-22, 08:21 AM by Radical.)
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
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#3
2021-06-23, 06:23 PM
(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?
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#4
2021-06-23, 07:37 PM (This post was last modified: 2021-06-23, 07:47 PM by Radical.)
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);
}
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#5
2021-06-24, 11:16 AM (This post was last modified: 2021-06-24, 11:16 AM by Pinch.)
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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#6
2021-06-24, 07:06 PM
(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?
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#7
2021-06-25, 08:22 AM
(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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#8
2021-06-25, 10:13 PM
(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?
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#9
2021-06-26, 11:53 AM
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.
« 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