[Plugin] [REL] Textdraw Plugin V0.1a - BETA
#1

Textdraw Plugin V0.1a - BETA

Let's go straight into the details:

Natives:

* Text:TD_Create(Float:PosX, Float:PosY, textstring[]);
- Creates a Textdraw, and applies the default attributes.

* TD_Destroy(Text:textid);
- Destroys a Textdraw.

* TD_SetString(Text:textid, textstring[]);
- Set the string of a textdraw.

* TD_GetString(Text:textid);
- Get the string of a textdraw. (Alternative: pTD_GetString(Text:textid, returnstring[]); Incase you want to specify the length yourself.)

* Bool:TD_Shown(playerid, Text:textid);
- Check if a Textdraw is shown to a playerid.

* Bool:TD_ShownForAll(Text:textid);
- Check if a textdraw is shown to all players.

* Bool:TD_Valid(Text:textid);
- Check if a textdraw ID is valid or not.

* TD_CopyAttributes(Text: sourcetextid, Text:targettextid);
- Copy the attributes of a textdraw to another. (Excluding the string & position)

* TD_SetPos(Text:textid, Float:PosX, Float:PosY);
- Set the X,Y position of a textdraw.

* TD_GetPos(Text:textid, &Float:PosX, &Float:PosY);
- Get the X,Y position of a textdraw.

* TD_LetterSize(Text:textid, Float: sizeX, Float: sizeY);
- Set the letter size.

* TD_GetLetterSize(Text:textid, &Float: sizeX, &Float: sizeY);
- Get the letter size.

* TD_TextSize(Text:textid, Float: sizeX, Float: sizeY);
- Set the Text size.

* TD_GetTextSize(Text:textid, &Float: sizeX, &Float: sizeY);
- Get the Text size.

* TD_Alignment(Text:textid, alignmenttype);
- Set Alignment.

* TD_GetAlignment(Text:textid);
- Get Alignment.

* TD_Color(Text:textid, color);
- Set Color.

* TD_GetColor(Text:textid);
- Get Color.

* TD_UseBox(Text:textid, option);
- Enable/Disable Box.

* TD_IsBox(Text:textid);
- Returns Box True or False.

* TD_BoxColor(Text:textid, color);
- Set Box Color.

* TD_GetBoxColor(Text:textid);
- Get Box Color.

* TD_SetShadow(Text:textid, shadowsize);
- Set Shadow size.

* TD_GetShadow(Text:textid);
- Get shadow size.

* TD_SetOutline(Text:textid, outlinesize);
- Set outline size.

* TD_GetOutline(Text:textid);
- Get outline size.

* TD_BackgroundColor(Text:textid, color);
- Set Background Color.

* TD_GetBackgroundColor(Text:textid);
- Get Background Color.

* TD_Font(Text:textid, fonttype);
- Set Textdraw Font.

* TD_GetFont(Text:textid);
- Get Textdraw Font.

* TD_SetProportional(Text:textid, option);
- Set the letters proportional.

* TD_GetProportional(Text:textid);
- Proportionality True/False.

* TD_Show(playerid, Text:textid);
- Show a textdraw to a player.

* TD_Hide(playerid, Text:textid);
- Hide a textdraw from a player.

* TD_ShowForAll(Text:textid);
- Show a textdraw to all players.

* TD_HideForAll(Text:textid);
- Hide a textdraw from all players.

* TD_EnableLogs();
* TD_DisableLogs();
- Enabling logs will show you Each and Every textdraw changes taking place.

Features:
- Extra useful functions.
- Whenever you change a single attribute of the textdraw, it will update on every clients screen.
- You don't have to use TextDrawShowForPlayer again and again after changing settings.

Installation:
- Download the .rar file and Extract it using Archive Extractors like WinRAR.
- Copy pawno/include/tdstreamer.inc to your server/pawno/include/
- Copy plugins/tdstreamer.dll to your server/plugins
- Add tdstreamer to server.cfg:
Code:
Example: "plugins sscanf tdstreamer"
- Finally, add this: #include <tdstreamer> to your script and all done..
You don't have to change the default functions, it will be done automatically.

Notes:
- When you include this to your script, all your default TextDraw functions will change into the modified ones.
- By speed, this is slower than the default functions, well, duh. But Flawless and Better.
- I'll go into detail soon, topic will be updated.

Special thanks to:
- Zeex
- CyNiC
- Gamer_Z

Downloads:
Windows - Plugin/Source
Linux - I need someone to help me compile an .so file. I'm no good with GCC Cross compilers and all.. x) [PM ME if you're interested]

This is in Beta stage (Testing purpose), so if you find bugs, report ASAP.
Reply
#2

Holy jesus.
Reply
#3

hmm, good one.. saved Kalcor from doing it I guess
Reply
#4

I love you, you are the best.[nogay please]
Reply
#5

I don't see why a plugin would be required for this. Y_Less has done pretty much the same thing in YSI, for example.
Good job, though!
Reply
#6

Quote:
Originally Posted by Markx
View Post
Holy jesus.
Quote:
Originally Posted by Kar
View Post
hmm, good one.. saved Kalcor from doing it I guess
Quote:
Originally Posted by Naruto_Emilio
View Post
I love you, you are the best.[nogay please]
Thanks guys!

Quote:
Originally Posted by Slice
View Post
I don't see why a plugin would be required for this. Y_Less has done pretty much the same thing in YSI, for example.
Good job, though!
Thanks, I was learning to code a plugin and made this. So, thought of sharing it.
(It's funny how I managed to do it. x) )
Reply
#7

Good job.
Reply
#8

nice job men
Reply
#9

Pretty cool, keep it up.
Reply
#10

This is scriptable in pawn but this is nice practice for c++
BTW. Nice plugin
Reply
#11

Very nice dude.
Reply
#12

If you want a suggestion, make a native function to fade textdraws and stuff. That would be great. Like:
TD_Fade(txtd,r,g, b,a, time, functiontoexecuteafter[]);

^.^

Great plugin.
Reply
#13

Very good but add TD_FadeForPlayer(in/out...
TD_FadeForAll(in/out, ...

EDIT: wow, didn't know about poster above -_-''
Reply
#14

Someone compile it for linux please?
Reply
#15

rofl, nice

i'll make a include soon
Reply
#16

Really nice mate, keep up the good work.
Reply
#17

Great Job
Reply
#18

Nice work.
Reply
#19

Dynamic textdraw style updating, nice!
The function names are somewhat similar to y_td though.
Reply
#20

This is what i needed to my server very very usefull work GooD Job!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)