So.. Possible to hook users chat say? Log this crap into file is possible[DOUBLEPOST=1414367617][/DOUBLEPOST]Solved
Try to create my first resource on this community
Solved Logging of chat
Discussion in 'Plugin Requests' started by kpoIIIkaeHo7, Oct 26, 2014.
-
Wulf Community Admin
You can use OnRunCommand and pick out the chat from the chat.say command.
-
-
Wulf Community Admin
You would just need to check for arg.cmd.namefull and chat.say with arg:GetString(0, "text").
I will be adding chat logging as an option to my Logger plugin soon by the way.Last edited: Oct 27, 2014 -
I'm tried with this one
local cmd = arg.cmd.namefull
local argument = arg:GetString(0, "text")
if cmd and cmd == "chat.say" then
if (argument.Length == 0) then return end
print("[CHAT] " .. player.displayName .. ": " .. argument)
end But this log empty messages (open chat to read last messages for example) too. Like this
argument[0] == '/' don't work too to skip chat commands to log -
Wulf Community Admin
Here ya go: http://oxidemod.org/resources/logger.670/.