TextDrawMove(Text:text, Float:x, Float:y, Float:speed);
#1

how i can create this
native TextDrawMove(Text:text, Float, Float:y, Floatpeed);
Reply
#2

Never heard that before but perhaps:
pawn Код:
TextDrawMove(Text:text, Float:x, Float:y, Float:speed);
First argument is the name of the text
Second argument is the PosX destination
Third argument is the PosY destination
The last argument is set the speed

Quote:
Originally Posted by Colossus_
Посмотреть сообщение
Show me the link if you can find that in wiki
Reply
#3

But it is possible to create, I thought that there are some scripts with that function
Reply
#4

I might create create something for this.

TextDrawFade and TextDrawMove

Ill release it soon.
Reply
#5

i think if this CODE will help
Reply
#6

This is a pretty easy function to make. The link in the above topic has the general idea of how to do it.

pawn Код:
public OnGameModeInit()
{
    TD = TextDrawCreate(100.0, 100.0, "This is a moving text");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/movetext", cmdtext, true, 10) == 0)
    {
        TextDrawMove(TD, 101.00, 102.00, "This is a moving Text");
        return 1;
    }
    return 0;
}

stock TextDrawMove(Text:textid, Float:xpos, Float:ypos, text[])
{
    TextDrawDestroy(textid);
    textid = TextDrawCreate(xpos, ypos, text);
    return 1;
}
You always have the issue of re-adding the effects E.g. the colour and shadows etc. If you where just using this for 1-2 textdraws, it would be fine .
Reply
#7

Quote:
Originally Posted by Colossus_
Посмотреть сообщение
Using my idea..
Cool, its not just you that wants it!

Besides don't make crap and say that this is your IDEA, it isn't this isnt your topic and you didn't even give me the idea. Stop claiming that this is your 'IDEA'

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
This is a pretty easy function to make. The link in the above topic has the general idea of how to do it.

pawn Код:
public OnGameModeInit()
{
    TD = TextDrawCreate(100.0, 100.0, "This is a moving text");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/movetext", cmdtext, true, 10) == 0)
    {
        TextDrawMove(TD, 101.00, 102.00, "This is a moving Text");
        return 1;
    }
    return 0;
}

stock TextDrawMove(Text:textid, Float:xpos, Float:ypos, text[])
{
    TextDrawDestroy(textid);
    textid = TextDrawCreate(xpos, ypos, text);
    return 1;
}
You always have the issue of re-adding the effects E.g. the colour and shadows etc. If you where just using this for 1-2 textdraws, it would be fine .
You could Hook some variables into the function to gather its information, COLOR etc.. That way you don't need so many parameters....
Reply
#8

@Lorence, while you're at it, you should also make a TextDrawSlide function. To slide it across the screen. Pretty sure it could be done with timers and lots of updating!
Reply
#9

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Cool, its not just you that wants it!
You could Hook some variables into the function to gather its information, COLOR etc.. That way you don't need so many parameters....
I could but, this was just to give him the idea. Hooking variables can be done for a few textdraws but it's long and tedious. The best way is to add all of the information to the TextDrawMove function but, someone else can if they want to write the function.
Reply
#10

Quote:
Originally Posted by The Toni
Посмотреть сообщение
@Lorence, while you're at it, you should also make a TextDrawSlide function. To slide it across the screen. Pretty sure it could be done with timers and lots of updating!
Well, Ill make that aswell, when i have the time. I cannot be stuffed making so many enums and hooking textdraw functions, its hard work and kinda boring after a while. I'll do that soon aswell with the functions I stated
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)