samp.directory
← Skrypty i biblioteki

Sreyas-Sreelal/pawn-humanize

A human-friendly Pawn library

Biblioteka★ 2zaktualizowano lip 2018MITPAWNsampctl
Otwórz na GitHubie

Zainstaluj za pomocą sampctl

sampctl package install Sreyas-Sreelal/pawn-humanize

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

README.md

pawn-humanize

Pawn-humanize is a library inspired by go-humanize that makes stuff computers can read easily, more readable for humans.

Installation (Sampctl)

Simply install to your project:

sampctl package install thecodeah/pawn-humanize

Include in your code and begin using the library:

#include <humanize>

Features

Commas

0 -> 0
100 -> 100
1000 -> 1,000
1000000 -> 1,000,000
-100000 -> -100,000
HumanizeComma(integer, dest[], maxLength = sizeof dest)

Colors

0xA86420FF -> "Chocolate Brown"
0x42F44EFF -> "Lime Green"
0x137A8EFF -> "Teal"
HumanizeColor(color, dest[], maxLength = sizeof dest)

Ordinals

0 -> 0th
1 -> 1st
2 -> 2nd
3 -> 3rd
4 -> 4th
etc...
HumanizeOrdinal(number, dest[], maxLength = sizeof dest)

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

Sreyas-Sreelal/pawn-humanize: Biblioteka SA-MP | samp.directory