samp.directory
← Scripts et bibliothèques

Sreyas-Sreelal/pawn-humanize

A human-friendly Pawn library

Bibliothèque★ 2mis à jour juil. 2018MITPAWNsampctl
Ouvrir sur GitHub

Installer avec sampctl

sampctl package install Sreyas-Sreelal/pawn-humanize

Lance ceci dans le dossier de ton projet. sampctl télécharge le paquet et ce dont il dépend.

L’essayer dans le compilateur Pawn →

Ajoute ses fichiers include, avec les bibliothèques dont il dépend, au compilateur Pawn de ton navigateur, prêts à être inclus dans un script.

Dépend de 1 paquet

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)

Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche

Sreyas-Sreelal/pawn-humanize : Bibliothèque SA-MP | samp.directory