1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dir = "sys/lua/report/log.txt"
cmd = "!"
addhook("say","reportcmd")
addhook("sayteam","reportcmd")
function reportcmd(id,txt)
t=string.lower(txt)
if string.sub(t,1,1)==cmd then
if string.sub(t,2,7}=="report" then
i = tonumber(string.sub(t,9,10))
r = string.sub(t,11)
if player(i,"exists") then
from = player(id,"name") name = player(i,"name") usgn = player(i,"usgn") ip = player(i,"ip")
local file = dir
msg2(id,"success report "..name)
msg2(i,"you are reported by "..from)
io.open(file,"w")
file:write(from.." reports "..name.." and "..name.." uses IP "..ip..", uses USGN "..usgn.." because "..r)
file:close()
end
end
end
end
I can't test it because I am using my phone.
LUA Report Code
1 
Offline
TrialAndError