Biblioteka★ 9zaktualizowano maj 2024Brak licencjiPawnsampctl
Otwórz na GitHubieTo 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 xunder-matth/samp-altchat
Uruchom to w folderze swojego projektu. sampctl pobiera pakiet i to, od czego zależy.
Wypróbuj w kompilatorze Pawn →
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 1 pakietu
- sampctl/samp-stdlibnie ma go w tym katalogu
Używany przez 1 pakiet
README.md
samp-altchat
Installation
Simply install to your project:
sampctl package install xunder-matth/samp-altchat@v2
Include in your code and begin using the library:
#include <altchat>
Configuration
MAX_ALTCHAT_LINES
- Default value: 15
- Info: 15 should be fine on 1080p displays. However if you want you can crank it up if you need more max lines (1440p, 4k etc.)
DEFAULT_ALTCHAT_LINES
- Default value: 10
- Info: This is default alt. chat lines created if you don't pass
linesargument toCreatePlayerAltChat. Why 10? It's optimal for most displays (including 900p and 1080p).
ALTCHAT_AUTO_CREATE
- Default value: Not defined
- Info: You can add this before including
altchatif you don't want to manually callCreatePlayerAltChat. Keep in mind that this will callCreatePlayerAltChatinOnPlayerConnectand it will useDEFAULT_ALTCHAT_LINESaslinesparameter.
API
CreatePlayerAltChat
- Parameters:
playeridlines- Returns:
- 1 - success
- 0 - fail
DestroyPlayerAltChat
- Parameters:
playerid- Returns:
- 1 - successfully destroyed
- 0 - fail
TogglePlayerAltChat
- Parameters:
playeridbool:toggle- Returns:
- true - successfully toggled
- false - fail (probably not created)
SendPlayerAltChatMessage
- Parameters:
playeridconst message[]- Returns:
- 1 - successfully sended message to player
- 0 - fail (alt-chat not created or not shown for player)
IsPlayerAltChatCreated
- Parameters:
playerid- Returns:
- 1 - if alt. chat is created
- 0 - if alt. chat is not created
IsPlayerAltChatShown
- Parameters:
playerid- Returns:
- 1 - if alt. chat is shown
- 0 - if alt. chat is not shown
Notes
- If you include
y_hooksbeforealtchatinclude it will usey_hookshooking method - If you include
y_vabeforealtchatinclude you can useva_SendPlayerAltChatMessageto automatically format your messages CreatePlayerAltChatwill not fail if you reach Player TextDraw limit, it will warn you in server console
Testing
To test, simply run the package:
sampctl package run
Connect to server and test with commands
/state /create /destroy /show /hide /sendmsg
Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem