Модуль:FooterSplashText: различия между версиями
Kraskaska (обсуждение | вклад) (Новая страница: «local p = {} -- массив со всеми сплешами. сплеш может быть строкой или функцией возращающую строку local splash_texts = { "kraskaska was here", "powered by mediawiki", "こんにちは", function() return os.date("%Y").." is the year of Linux desktop!" end, "create your own european union" } function p.get_splash() local splash = splash_texts[math.random(1, #splash_texts)] if t...») |
(нет различий)
|
Версия от 12:10, 21 января 2025
{{#invoke:FooterSplashText|get_splash}} возвратит случайную строчку. Используется в футере Citizen.
Пример: powered by mediawiki
сейчас не сильно работает
local p = {}
-- массив со всеми сплешами. сплеш может быть строкой или функцией возращающую строку
local splash_texts = {
"kraskaska was here",
"powered by mediawiki",
"こんにちは",
function()
return os.date("%Y").." is the year of Linux desktop!"
end,
"create your own european union"
}
function p.get_splash()
local splash = splash_texts[math.random(1, #splash_texts)]
if type(splash) == "function" then
return splash()
else
return splash
end
end
return p