English time script

1 reply
Goto Page
To the start Previous 1 Next To the start
02.11.13 10:59:25 pm
Up
drthvdr
User
Offline Off
Code:
1
if os.date('%p')=='pm' then parse('hudtxt 9 "©000000255PM" 51 64 1') else parse('hudtxt 9 "©255000000AM" 51 64 1') end

why it's always huding AM ?..
03.11.13 12:36:51 am
Up
MikuAuahDark
User
Offline Off
Code:
1
if os.date('%p'):lower()=='pm' then parse('hudtxt 9 "©000000255PM" 51 64 1') else parse('hudtxt 9 "©255000000AM" 51 64 1') end


Note: Operator "==" at LUA on string is case sensitive.
The actual value is "PM" NOT "pm"
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
To the start Previous 1 Next To the start