function AddGoldLog(player,Str,cdkey)--player为在线玩家index,str为存入魔币记录的MSG内容,cdkey为离线玩家的账号----这些内容都需要从调用该函数的lua脚本内赋予
local f = io.open("./lua/luatxt/AddGoldLog.txt","a")
local msg = os.date("%x(%X)").."("..(os.time())..")|"
if player then
msg = msg..(Char.GetData(player,%对象_原名%)).."("..(Char.GetData(player,%对象_帐号%))..")|"..Str.."\n"
else
msg = msg.."不在线玩家("..(cdkey or "未能获取cdkey")..")|"..Str.."\n"
end
f:write(msg)
f:close()
end
|
|