mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-14 10:14:55 +02:00
Update to admin reports: Reports are categorised by status id. You can hide/show categories by clicking the table header. You can configure which statusIds you want to auto-hide.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
-- <talkaction words="!report" separator=" " script="adminreport.lua"/>
|
||||
-- Coded by Dark ShaoOz, modified by Znote
|
||||
function onSay(cid, words, param, channel)
|
||||
local storage = 6708 -- (You can change the storage if its already in use)
|
||||
local delaytime = 30 -- (Exhaust In Seconds.)
|
||||
@@ -11,10 +12,10 @@ function onSay(cid, words, param, channel)
|
||||
end
|
||||
if (getPlayerStorageValue(cid, storage) <= os.time()) then
|
||||
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your report has been received successfully!")
|
||||
db.query("INSERT INTO `player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , '" .. getPlayerName(cid) .. "', '" .. x .. "', '" .. y .. "', '" .. z .. "', '" .. string.gsub(param, "'", "\\'") .. "', '" .. os.time() .. "')")
|
||||
db.query("INSERT INTO `znote_player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , '" .. getPlayerName(cid) .. "', '" .. x .. "', '" .. y .. "', '" .. z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')")
|
||||
setPlayerStorageValue(cid,storage,os.time()+delaytime)
|
||||
else
|
||||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have to wait 30 seconds to report again.")
|
||||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have to wait "..getPlayerStorageValue(cid, storage) - os.time().." seconds to report again.")
|
||||
end
|
||||
return TRUE
|
||||
end
|
Reference in New Issue
Block a user