You are not logged in.
Pages: 1
on the nitmod is there a script or something to save the private /m messages that get done on the server or a way to see them while playing at all ?
thanks in advance
Offline
Hi,
There's nothing mod-related to save messages but I suppose you can enable logfile on your client and look for private messages afterwards.
Offline
Hello!
To view private messages on the server, you need to add a flag pmspec or all.
You have all the flags in this post: Click
Save logfile:
Server:
File type: chatlog.lua
--//Nazwa logu
logname = "chatlog.log"
function et_InitGame( levelTime, randomSeed, restart )
et.RegisterModname("Chatlog v1.0")
end
function et_ClientCommand( num, cmd )
if cmd == "say" or cmd == "say_team" or cmd == "say_buddy"
or cmd == "adminchat" or cmd == "privmsg" or cmd =="m" then
local msg = et.Q_CleanStr(et.ConcatArgs(1))
-- name without colors
local name = et.Q_CleanStr(et.gentity_get(num, "pers.netname"))
if cmd == "m" then -- it's a private msg
-- gets the target name
local pos = string.find(msg, " ")
if pos ~= nil then
local targetname = string.sub(msg, 1, pos-1)
-- if it's a client number, get the real name
if tonumber(targetname) ~= nil then
targetname = et.Q_CleanStr(et.gentity_get(tonumber(targetname),
"pers.netname"))
end
msg = "PM->[" .. targetname .. "]" .. string.sub(msg, pos)
end
else
msg = '[' .. cmd .. '] ' .. msg
end
WriteToFile(logname, string.format("[%s]-[%s]: %s\n",
os.date("%x %I:%M:%S %p"), name, msg ))
end
end
function WriteToFile( filename, str )
fd, len = et.trap_FS_FOpenFile( filename, et.FS_APPEND )
et.trap_FS_Write( str, string.len(str), fd )
et.trap_FS_FCloseFile( fd )
end
Client:
seta log "etconsole"
seta logfile "2"
Last edited by mazak (21-Dec-20 08:45:34)
Offline
okay thank you will give that a shot
Offline
Pages: 1