English Custom Number hud icon

16 comments
11.12.15 05:19:49 am
like 7 like it!
99 kb, 44 Downloads
MikuAuahDark
User
Offline Off
Custom Number hud by MikuAuahDark

∗ Description ∗
This Lua allows you to add custom hud that displays number.

∗ Installation ∗
The installation method for this file is unusual. Try to extract cn.lua and dofile cn_example.lua only in sys/lua to see the example.
Open cn_example.lua to see how the code is binded.
If you still can't understand how to use this lua, PM me.

∗ Used Global Variable ∗
> CustomNumber

∗ Functions List ∗
Please see https://github.com/MikuAuahDark/2dCustomNumberLua/wiki/Function-list.

∗ Files ∗
There's 3 scripts in the archive.
> cn.lua - The core functionality.
> cn_sif.lua - Example code how to add your own custom number hud. You also can use this code in your server if you want.
> cn_example.lua - Example code how it works. Displays time in seconds how long the server has been running in red big number.

∗ Notes ∗
1. CustomNumber.Update is expensive call because it deletes and add images everytime it's called. But there's no noticed lag in b0.1.2.6 (LuaJIT Power)
2. The berhaviour of this script if the number is overflowed is undefined.
3. The gfx/combonumber/ contains all image used for cn_sif.lua

∗ Version History ∗
>> v1.0
> INFO Initial commit.
imageimageimageimage
edited 2×, last 12.12.15 06:49:18 am
ok This file has been reviewed and approved by Communism (11.12.15 06:01:00 am)

Comments

16 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
14.12.15 06:26:36 am
Up
MikuAuahDark
User
Offline Off
@user Communism: No, there's no config to change the number color. It's all separated image.

Because everything is a separated image, you can create your own custom number hud by making digit 0 to 9 as image (the image size should be consistent) then create your own custom number hud.
13.12.15 08:01:31 pm
like I like it!
Up
Nekomata
User
Offline Off
Useful!
13.12.15 07:37:05 pm
like I like it!
Up
Communism
Reviewer
Offline Off
Would making the number images white and making a configurable color in config work?
13.12.15 06:49:50 pm
like I like it!
Up
Goo
User
Offline Off
looks good for zombie plague or something
13.12.15 01:05:54 pm
like I like it!
Up
Cure Pikachu
User
Offline Off
@user DaisukeOno: Yeah, what exactly can't you open? The ZIP file itself or its contents?

@File: Interesting, might be useful for something.
13.12.15 12:44:08 pm
Up
MikuAuahDark
User
Offline Off
What do you mean you can't open the file? does it shows error or something?
13.12.15 08:32:36 am
Up
DaisukeOno
User
Offline Off
Why i can't open these files ?
12.12.15 06:44:14 am
Up
MikuAuahDark
User
Offline Off
@user Avo: Actually there's 90 images in the archive. (It uses 0-based indexing).
@user Gaios: Lol, the rest of the image is actually for people that doesn't know how to add their custom number hud. So instead of creating it from stratch, I already created 9 pre-defined custom hud number which can be used by passing combonumber_[1-9] in the name parameter. dofile sys/lua/cn_sif.lua before using.
@user VADemon: I don't understand. PNG files are compressed already.

I guess I should upload more screenshots.
11.12.15 08:51:42 pm
like I like it!
Up
VADemon
User
Offline Off
That's fancy! Though some servers use so many HUD elements that they begin to look shitty again.

Btw: do you want the compressed version of PNGs? That's 72kB.
11.12.15 08:04:26 pm
Up
Rainoth
Moderator
Offline Off
If you guys actually bothered to check, the images are different.
So I guess it does utilize the system of using single digit images all the time but the style/color of the digits changes.

It's an okay file.
11.12.15 07:24:59 pm
like I like it!
Up
Avo
User
Offline Off
There are 89 files and most of them have size of 2kb or less what gives less than 178kb. I can't see any use for it actually, but they look pretty neat. Good job.
11.12.15 05:15:32 pm
Up
Gaios
Security Supporter
Offline Off
Let's download 89 images instead of 10.
11.12.15 02:27:26 pm
like I like it!
Up
Communism
Reviewer
Offline Off
Nice work.
11.12.15 02:26:43 pm
Up
MikuAuahDark
User
Offline Off
@user Yates: it will show 6.png and 4.png

There's actually 9 custom number hud defined in cn_sif.lua. You may want to take a look that file to see the reason why there's file named like 032.png.
11.12.15 01:46:32 pm
Up
Yates
Reviewer
Offline Off
Wait why are there numbers above 9 in the .zip?

When I want to show 64, does it show 64.png or 6.png and 4.png?
11.12.15 12:21:12 pm
like I like it!
Up
Ridho
User
Offline Off
I'm waiting for this
To the start Previous 1 Next To the start