E ai galera, suave?
Achei esse script aqui e resolvi postar.
Vamos la!
Em talkactions.xml adicione:
<talkaction words="!bugreport;/bugreport" event="script" value="bugreport.lua"/>
Em talkactions/scripts crie um arquivo com o nome de bugreport.lua e adicione:
function onSay(cid, words, param, channel) local storage = 6707 local delaytime = 120 local a = "data/logs/bugs.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 report has been received successfully!") f:write(""..getPlayerName(cid).." reported a bug at " .. os.date("%d %B %Y - %X.", os.time()) .."\n"..param.." [x="..getPlayerPosition(cid).x..", y="..getPlayerPosition(cid).y..", z="..getPlayerPosition(cid).z.."].\n\n----------------------------------------------------------\n") f:close() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait " .. exhaustion.get(cid, storage) .. " seconds to report.") end return TRUE end
Como usar:
!bugreport, seu comentário
Exemplo:
Druid reported a bug at 21 December 2011 - 20:24:42 There is a bug in Carlin Wall. [x=32360, y=31782, z=7]. ---------------------------------------------------------- Sorcerer reported a bug at 21 December 2011 - 20:28:01 Help me i cant move. [x=11457, y=45789, z=5]. ----------------------------------------------------------
Créditos: Bogart