Talk:GetRealMonthM: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "Simply it can be like this (much faster): --Walid (talk) <syntaxhighlight lang="lua"> local monthsTable = {"January","February","March","Ap...")
 
mNo edit summary
 
Line 1: Line 1:
Simply it can be like this (much faster): --[[User:Walid|Walid]] ([[User talk:Walid|talk]])
Try to change the function name to getRealMonthName (much better) --[[User:Walid|Walid]] ([[User talk:Walid|talk]])
 
<syntaxhighlight lang="lua">
local monthsTable = {"January","February","March","April","May","June","July","August","September","October","November","December"}
 
function getRealMonthName()
    local time = getRealTime()
    local month = time.month + 1
    return monthsTable[month]
end
</syntaxhighlight>
 
On more thing try to change the function name to getRealMonthName (much better)

Latest revision as of 18:57, 9 November 2016

Try to change the function name to getRealMonthName (much better) --Walid (talk)