[Include] Textdraw(Very useful)
#1

[FONT="Impact"]
Hello!Today I am gonna release my first Include!

I hope this helps you guys!


To make it work make this:
Код:
#include <a_samp>
#include <TXD>
//.......
Take a look at the code:

Код:
#include <a_samp>

stock C_TextDrawCreate(ID,posx,posy,string[],bgcolor,color,font,outline,proportionality,size1,size2)
{
ID = TextDrawCreate(posx, posy, string[]);
TextDrawBackgroundColor(ID, bgcolor);
TextDrawFont(ID, font);
TextDrawLetterSize(ID, size1, size2);
TextDrawColor(ID, color);
TextDrawSetOutline(ID, outline);
TextDrawSetProportional(ID, proportionality);
}

stock C_TextDrawShowForPlayer(playerid, ID)
{
TextDrawShowForPlayer(playerid, ID);
}

stock C_TextDrawShowForAll(ID)
{
TextDrawShowForAll(ID);
}

stock C_TextDrawHideForPlayer(playerid, ID)
{
TextDrawHideForPlayer(playerid, ID);
}

stock C_TextDrawHideForAll(ID)
{
TextDrawShowForAll(ID);
}
Download:

Look up.
Reply
#2

So this is basiclly a stock to create Textdraws with one line?
Some functions are missing:
TextDrawAlignment
TextDrawSetShadow
TextDrawSetSelectable
Reply
#3

Quote:
Originally Posted by ElliotH
Посмотреть сообщение
So this is basiclly a stock to create Textdraws with one line?
Some functions are missing:
TextDrawAlignment
TextDrawSetShadow
TextDrawSetSelectable
Will be added in next update.
Reply
#4

Anyone else?
Reply
#5

You can do a macro before that a function, this way, the compilation would be more rapid.

In yes, this include is really unnecessary, since you do not have functions added in the same ones ... ... in addition, it would give mistakes for all sides, since they do not go tag's.


This one would be better:


pawn Код:
#define K_TextDrawCreate(Text:%0, Float:%1, Float:%2, %3, %4, %5, %6, %7, Float:%8, Float:%9, %10) \
    %0 = TextDrawCreate(%1, %2, %3); \
    TextDrawBackgroundColor(%0, %4); \
    TextDrawFont(%0, %5); \
    TextDrawLetterSize(%0, %6, %7); \
    TextDrawColor(%0, %8); \
    TextDrawSetOutline(%0, %9); \
    TextDrawSetProportional(%0, %10);
   
#define K_TextDrawShowForPlayer(%0, Text:%1) TextDrawShowForPlayer(%0, %1);
#define K_TextDrawShowForAll(Text%0) TextDrawShowForAll(%0);
#define K_TextDrawHideForPlayer(%0, Text:%1) TextDrawHideForPlayer(%0, %1);
#define K_TextDrawHideForAll(Text:%0) TextDrawShowForAll(%0);

Regards.
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
That's really not better!



pawn Код:
return K_TextDrawCreate(whatever); // Error.
What?
Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
You can do a macro before that a function, this way, the compilation would be more rapid.

In yes, this include is really unnecessary, since you do not have functions added in the same ones ... ... in addition, it would give mistakes for all sides, since they do not go tag's.


This one would be better:


pawn Код:
#define K_TextDrawCreate(Text:%0, Float:%1, Float:%2, %3, %4, %5, %6, %7, Float:%8, Float:%9, %10) \
    %0 = TextDrawCreate(%1, %2, %3); \
    TextDrawBackgroundColor(%0, %4); \
    TextDrawFont(%0, %5); \
    TextDrawLetterSize(%0, %6, %7); \
    TextDrawColor(%0, %8); \
    TextDrawSetOutline(%0, %9); \
    TextDrawSetProportional(%0, %10);
   
#define K_TextDrawShowForPlayer(%0, Text:%1) TextDrawShowForPlayer(%0, %1);
#define K_TextDrawShowForAll(Text%0) TextDrawShowForAll(%0);
#define K_TextDrawHideForPlayer(%0, Text:%1) TextDrawHideForPlayer(%0, %1);
#define K_TextDrawHideForAll(Text:%0) TextDrawShowForAll(%0);

Regards.
Listen you do it your way and I do it my way.


This is my first fucking include!
Reply
#7

Quote:
Originally Posted by boomerboom
Посмотреть сообщение
What?

Listen you do it your way and I do it my way.

This is my first fucking include!
Are you mad bro? You said suggestions he gave you a specific suggestion what to use, don't be mad he's helping you. you release something expect someone criticize it
Reply
#8

Stop acting like shit and accept advice of others scripters... If you're not gonna improve your include you'll be the only one who's gonna use it
Reply
#9

I took the inconvenience to translate words and to do a much better code in order that you learn and improve ... ... and to comment with a hypocrites' humor?
Reply
#10

You know what...Screw this.
Reply
#11

Quote:
Originally Posted by boomerboom
Посмотреть сообщение
You know what...Screw this.
How are you going to expect to get any better as a scripter if you can't even take critics?
It was a nice try for your first include, take what they are telling you and put it to use, who knows! Maybe you become the next ******?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)