[Include] TextDraw API!
#1

(API does not support PlayerText)


Hi there.
I present here, the author's API to textdrawуw. In this way we can textdrawowi m.in retrieve information about a particular textdrawu or simply change its position.
Include, I started doing once, but someone had to do it and I gave up because I did not have internet and the free time I decided to finish the library.
The library has its wade in creating textdrawu (TextDrawCreate), Wade soon describe.
Cons:
  • All data are variable (ram ').
  • Changes to the procedure for creating textdrawu.
Advantages:
  • An example of the script.
  • Ability to download data on the textdrawie.
  • The ability to change the position TextDraw (system remembers who he turns TextDraw and all the information about it).
As I have written the script has a lot of wade in creating that?
Currently TextDraw create *
Код:
 new Text: moj_td = TextDrawCreate (0.0, 0.0, "My TextDraw")
in my API has been changed. *
Код:
 new Text: moj_td;
TextDrawCreate (moj_td, 0.0, 0.0, "My TextDraw")
That is the function of creation (TextDrawCreate) is one option, and from now on we have to ID textdrawu give in it.
As already talked about the possibility of downloading any information about textdrawie
getTextDrawPosX (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: the X position textdrawu
getTextDrawPosY (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: Y position textdrawu
getTextDrawColor (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: color textdrawu
getTextDrawBoxColor (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: color box set textdrawu
getTextDrawBackgroundColor (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: backgroundcolor textdrawu
getTextDrawAlignment (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: alignment textdrawu
getTextDrawFont (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: font textdrawu
getTextDrawLetterSizeX (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: letter (?) Size X textdrawu
getTextDrawLetterSizeY (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: letter (?) Size S textdrawu
getTextDrawTextSizeX (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: size textdrawu X
getTextDrawTextSizeY (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: size textdrawu Y
getTextDrawOutline (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: outline textdrawu
getTextDrawShadow (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: Shadow textdrawu
getTextDrawProportional (Text: TD_ID) *
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: Proportional textdrawu
getTextDrawUseBox (Text: TD_ID)
Parameters:
  • TD_ID: ID textdrawu which you want to take the data.
Returning:
  • The definition of returns: UseBox
I mentioned about the possibility of changing the position textdrawu - so it never been easier.
Słуży to the TextDrawSetPos
TextDrawSetPos (Text: inc_TextDraw_, Float: posx, Float: posy)
Parameters:
  • Inc_TextDraw_ - ID Textdrwau to change.
  • POSX - new X position (often useful function getTextDrawPosX).
  • Posy - new Y position (often useful function getTextDrawPosY).
Returning:
  • This function returns no value.
API by me, but do not have anywhere to mention this, but it would be nice if someone did not issue this somewhere amended by!
*
For a small elite hejterуw, Appreciate it had put open soruce code, written specifically for Pawno and before you start I hejtować (or stain on) You think about it as if you wrote the API.
*
As I mentioned at the beginning of the API does not support PlayerText, so if you have the proper capacity, and you want to add support for drawing on my code - you're welcome .
*
Have a good time and I think someone useful API.
Download [attachment = 340: textdraw_api.zip]
I would add that in filterscripts folder is a sample script to use the API.

Original topic http://pawno.pl/index.php?/topic/190...-textdraw-api/


Download
http://p4serv.pl/textdraw_api.zip
Reply
#2

If this (TextDrawSetPos) works, this is fantastic! But what was the need of assigning IDs? That makes it easier to screw up (like with dialogs)
Reply
#3

Rajat_Pawar, filterscripts folder you have a sample script to use TextDraw API In-Game use / SETPOS [speed] (eg / SETPOS 30 (fine)).

Sorry, I forgot about download

Download
http://p4serv.pl/textdraw_api.zip
Reply
#4

this isnt vb where getInputData ... bhaaa ... i suggest for Get for caps like ******..

nice work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)