SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 30/07/2018, 10:58 PM   #1
Codeah
Big Clucker
 
Codeah's Avatar
 
Join Date: Jun 2016
Location: The Netherlands
Posts: 81
Reputation: 53
Flowers Humanize - A human-friendly Pawn library

Humanize
Description

Humanize is a library that makes stuff computers can read easily, more readable for humans.

Features

Thousands Seperators
Code:
0 -> 0
100 -> 100
1000 -> 1,000
1000000 -> 1,000,000
-100000 -> -100,000
Code:
HumanizeThousand(integer, dest[], maxLength = sizeof dest, delimiter[] = ",")
Colors
Code:
0xA86420FF -> "Chocolate Brown"
0x42F44EFF -> "Lime Green"
0x137A8EFF -> "Teal"
Code:
HumanizeColor(color, dest[], maxLength = sizeof dest)
Numbers to words
Code:
1000 -> "one thousand"
1234 -> "one thousand two hundred thirty-four"
-1234 -> "negative one thousand two hundred thirty-four"
Code:
HumanizeNumber(number, dest[], maxLength = sizeof dest)
Ordinals
Code:
0 -> 0th
1 -> 1st
2 -> 2nd
3 -> 3rd
4 -> 4th
etc...
Code:
HumanizeOrdinal(number, dest[], maxLength = sizeof dest)
Install / Download

You can find all releases here.

Alternatively, you can simply install Humanize to your project using SampCTL.
Code:
sampctl package install thecodeah/pawn-humanize
Include in your code and begin using the library:
Code:
#include <humanize>
Issues / Suggestions

Please leave suggestions and report issues on Github.
__________________

Last edited by Codeah; 03/08/2018 at 05:07 PM. Reason: Release v1.1
Codeah is offline   Reply With Quote
Old 31/07/2018, 06:00 AM   #2
iAmir
Banned
 
Join Date: May 2017
Location: Iran
Posts: 112
Reputation: 191
Default Re: Humanize - A human-friendly Pawn library

nice one
iAmir is offline   Reply With Quote
Old 07/08/2018, 04:09 PM   #3
Verc
Banned
 
Join Date: Apr 2018
Location: 🇯🇵
Posts: 172
Reputation: 42
Default Re: Humanize - A human-friendly Pawn library

Thank you! This will make my job easier!
Verc is offline   Reply With Quote
Old 04/11/2019, 10:06 PM   #4
Autorojo
Little Clucker
 
Join Date: Mar 2015
Posts: 17
Reputation: 0
Default Re: Humanize - A human-friendly Pawn library

That HumanizeThousand function is just perfect. Thanks you!
Autorojo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pawn Compiler Library Pro_Drifter Scripting Help 3 25/07/2015 04:48 PM
[Ajuda]pawn library !!! Carlos_barbosa Português/Portuguese 1 26/05/2012 09:26 PM
[Ajuda]pawn library Carlos_barbosa Português/Portuguese 2 19/05/2012 05:21 AM


All times are GMT. The time now is 07:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.