function onSay(cid, words, param, channel)
local storage = 1234
local delaytime = 60
local a = "data/logs/text.txt"
local f = io.open(a, "a+")
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, delaytime)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your message has been saved!")
f:write("" .. os.date("%d %B %Y - %X.", os.time()) .."\n"..getPlayerName(cid).." said: "..param..".\n----------------------------------------------------------\n")
f:close()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait " .. exhaustion.get(cid, storage) .. " seconds to save a message.")
end
return TRUE
end