Dateien

> > CS2D > Lua Scripts > Custom Number hud
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Custom Number hud >

16 Kommentare99 kb, 418 Downloads

alt Custom Number hud

MikuAuahDark
User Off Offline

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.
2× editiert, zuletzt 12.12.15 06:49:18
Zugelassen von Infinite Rain

Download Download

99 kb, 418 Downloads

Kommentare

16 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

MikuAuahDark
User Off Offline

@user Infinite Rain: 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.

alt

Nekomata
User Off Offline

Useful!
Ich mag es!

alt

Infinite Rain
Reviewer Off Offline

Would making the number images white and making a configurable color in config work?
Ich mag es!

alt

Mami Tomoe
User Off Offline

looks good for zombie plague or something
Ich mag es!

alt

Cure Pikachu
User Off Offline

@user DaisukeOno: Yeah, what exactly can't you open? The ZIP file itself or its contents?

@File: Interesting, might be useful for something.
Ich mag es!

alt

MikuAuahDark
User Off Offline

What do you mean you can't open the file? does it shows error or something?

alt

DaisukeOno
User Off Offline

Why i can't open these files ?

alt

MikuAuahDark
User Off Offline

@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.

alt

VADemon
User Off Offline

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.
Ich mag es!

alt

Rainoth
Moderator Off Offline

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.

alt

Avo
User Off Offline

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.
Ich mag es!

alt

Gaios
Reviewer Off Offline

Let's download 89 images instead of 10.

alt

MikuAuahDark
User Off Offline

@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.

alt

Yates
Reviewer Off Offline

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?

alt

Ridho
User Off Offline

I'm waiting for this
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang