GetRealMonthH
Jump to navigation
Jump to search
Syntax
getRealMonthH ( )
Returns
This function returns a string containing the real month name
Code
Click to collapse [-]
Function sourcemonthTable = { -- table ["1"] = "January", ["2"] = "February", ["3"] = "March", ["4"] = "April", ["5"] = "May", ["6"] = "June", ["7"] = "July", ["8"] = "August", ["9"] = "September", ["10"] = "October", ["11"] = "November", ["12"] = "December" } function getRealMonthM() local time = getRealTime() local month = time.month + 1 for i, v in pairs ( monthTable ) do -- loop if string.find ( i , month ) then -- find the month if v ~= "" then -- check if there is a name m = v end end end return m end
Example
Click to collapse [-]
Clientside exampleThis example output the real month.
addCommandHandler("month", function () local month = getRealMonthH() outputChatBox(month,255,0,0,true) end )