[REL] Textdraw Plugin V0.1a - BETA -
iPLEOMAX - 08.10.2011
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.
Re: [REL] Textdraw Plugin V0.1a - BETA -
Markx - 08.10.2011
Holy jesus.
Re: [REL] Textdraw Plugin V0.1a - BETA -
Kar - 08.10.2011
hmm, good one.. saved Kalcor from doing it I guess
Re : [REL] Textdraw Plugin V0.1a - BETA -
Naruto_Emilio - 08.10.2011
I love you, you are the best.[nogay please]
Re: [REL] Textdraw Plugin V0.1a - BETA -
Slice - 08.10.2011
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!
Re: [REL] Textdraw Plugin V0.1a - BETA -
iPLEOMAX - 08.10.2011
Quote:
Originally Posted by Markx
Holy jesus.
|
Quote:
Originally Posted by Kar
hmm, good one.. saved Kalcor from doing it I guess
|
Quote:
Originally Posted by Naruto_Emilio
I love you, you are the best.[nogay please]
|
Thanks guys!
Quote:
Originally Posted by Slice
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) )
Re: [REL] Textdraw Plugin V0.1a - BETA -
GangsTa_ - 08.10.2011
Good job.
Respuesta: [REL] Textdraw Plugin V0.1a - BETA -
Zafiro - 08.10.2011
nice job men
Re: [REL] Textdraw Plugin V0.1a - BETA -
TheArcher - 08.10.2011
Pretty cool, keep it up.
Re: [REL] Textdraw Plugin V0.1a - BETA -
MicroD - 08.10.2011
This is scriptable in pawn but this is nice practice for c++
BTW. Nice plugin
Re: [REL] Textdraw Plugin V0.1a - BETA - [L3th4l] - 08.10.2011
Very nice dude.
Re: [REL] Textdraw Plugin V0.1a - BETA -
steki. - 08.10.2011
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.
Re: [REL] Textdraw Plugin V0.1a - BETA -
knackworst - 08.10.2011
Very good but add TD_FadeForPlayer(in/out...
TD_FadeForAll(in/out, ...
EDIT: wow, didn't know about poster above -_-''
AW: [REL] Textdraw Plugin V0.1a - BETA -
Awesome™ - 08.10.2011
Someone compile it for linux please?
Re: [REL] Textdraw Plugin V0.1a - BETA -
Lorenc_ - 09.10.2011
rofl, nice
i'll make a include soon
Re: [REL] Textdraw Plugin V0.1a - BETA -
iGetty - 09.10.2011
Really nice mate, keep up the good work.
Respuesta: [REL] Textdraw Plugin V0.1a - BETA -
DarkChildren - 09.10.2011
Great Job
Re: [REL] Textdraw Plugin V0.1a - BETA -
HyperZ - 09.10.2011
Nice work.
Re: [REL] Textdraw Plugin V0.1a - BETA -
Diagram - 09.10.2011
Dynamic textdraw style updating, nice!
The function names are somewhat similar to y_td though.
Re: [REL] Textdraw Plugin V0.1a - BETA -
Edvin - 09.10.2011
This is what i needed to my server very very usefull work GooD Job!