Posts: 413
Threads: 59
Joined: Sep 2013
06.01.2014, 18:38
(
Последний раз редактировалось boomerboom; 06.01.2014 в 20:26.
)
[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.
Posts: 7
Threads: 1
Joined: Dec 2013
Reputation:
0
So this is basiclly a stock to create Textdraws with one line?
Some functions are missing:
TextDrawAlignment
TextDrawSetShadow
TextDrawSetSelectable
Posts: 413
Threads: 59
Joined: Sep 2013
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.
Posts: 413
Threads: 59
Joined: Sep 2013
Posts: 2,041
Threads: 97
Joined: Jun 2013
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.
Posts: 413
Threads: 59
Joined: Sep 2013
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!
Posts: 2,041
Threads: 97
Joined: Jun 2013
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?
Posts: 413
Threads: 59
Joined: Sep 2013
You know what...Screw this.