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
Initial commit.
edited 2×, last 12.12.15 06:49:18 am
Approved by Infinite Rain
Download
99 kb, 446 Downloads