08.10.2011, 18:19
(
Last edited by iPLEOMAX; 08/10/2011 at 07:11 PM.
)
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:
- 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.
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"
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.