local config = {
-- ["boss_name - Must be lowercase letters"] = {global_storage},
["heroshema"] = {45001},
["getry"] = {45002},
["amandyi"] = {45003}
}
function onSay(cid, words, param, channel)
if param == "" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Requires an additional parameter. example: !bosstimer heroshema")
return true
end
param = param:lower()
local x = config[param]
if x then
local timer = getGlobalStorageValue(x[1]) - os.time()
if timer > 0 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "" .. (param:gsub("^%l", string.upper)) .. " will spawn in ".. os.date("!%Hh %Mm %Ss", timer) ..".")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (param:gsub("^%l", string.upper)) .. " has spawned.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Boss timer " .. param .. " does not exist.")
return true
end