sanpezlo/td-notification
This Include allows you to create TextDraw Notifications
To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.
Zainstaluj za pomocą sampctl
sampctl package install sanpezlo/td-notification
Uruchom to w folderze swojego projektu. sampctl pobiera pakiet i to, od czego zależy.
Dodaje jej pliki include, razem z bibliotekami, od których zależy, do kompilatora Pawn w twojej przeglądarce, gotowe do dołączenia w skrypcie.
Zależy od 2 pakietów
- sampctl/samp-stdlibnie ma go w tym katalogu
- kristoisberg/samp-td-string-width★ 22
README.md
td-notification
This Include allows you to create TextDraw Notifications
Installation
Simply install to your project:
sampctl package install ThePez/td-notification
Include in your code and begin using the library:
#define TDN_MODE_DEFAULT
#include <td-notification>
Usage
MAX_TDN: set how many TextDraw will be shown in TextDraw's NotificationTDN_POS_X: TextDraw notifications will be at the position set on the X axisTDN_POS_Y: TextDraw notifications will be at the position set on the Y axisTDN_FONT: TextDraw Notification will have the set fontTDN_LETTER_SIZE_X: TextDraw notifications will have the set font size on the X axisTDN_LETTER_SIZE_Y: TextDraw notifications will have the set font size on the Y axisTDN_SIZE: TextDraw notifications will have the set width sizeTDN_COLOR: TextDraw notifications will have the set font colorTDN_COLOR_BOX: TextDraw notifications will have the set box colorTDN_PROPORTIONAL: TextDraw notifications will have the set proportionalTDN_DISTANCE: TextDraw notifications will have the set distanceMAX_TDN_TEXT: TextDraw notifications will have a maximum the set textTDN_MODE_DOWN: TextDraw notifications will scroll downTDN_MODE_UP: TextDraw notifications will scroll upTDN_TIME: TextDraw notifications will hide at the set timeTDN_MODE_DEFAULT: TextDraw notifications will use the default settings
Function
ShowTDN(playerid, const reason[]);
Shows a textdraw with the set text
Normal functioning: the TextDraw will be automatically hidden, with the time set in TDN_TIME (no need to use HideTDN)
- Returns 1, if the textdraw is shown, perfectly
- Returns -1, if the text drawing could not be displayed (there are as many TextDraws displayed as set in
MAX_TDN)
ShowTDN_Manual(playerid, const reason[]);
Shows a textdraw with the set text
Manual functioning: the TextDraw will not automatically hide, you must use HideTDN
- Returns 0 - (
MAX_TDN- 1), if the textdraw is shown, perfectly, will return the id of the TextDraws (the id you will use inHideTDN) - Returns -1, if the text drawing could not be displayed (there are as many TextDraws displayed as set in
MAX_TDN)
HideTDN(playerid, TDN);
Hides the textdraw
You must pass the id that returned the function ShowTDN_Manual
- Returns 1, if the textdraw was hidden, perfectly
- Returns 0, if the id passed in the function was not found
Testing
To test, simply run the package:
sampctl package run
Credits
- ThePez - Creator of the include
- NaS - helped me gather information to make the include, also helped me somewhere in the code
- Kristo - Creator of the samp-td-string-width include, it helped me to calculate the width of the TextDraw
pawnpawn-packagesa-mp-librarytextdraw-notifications
Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem