lcd1232
fileRead
fileGetSize
function OnPlayerChat ( sMsg, nType )
if nType == 0 or nType == 1 then
local aTime = getRealTime()
local nMonth = aTime.month + 1
local nYear = aTime.year + 1900
local nMonthday = aTime.monthday
local nHour = aTime.hour
local nMin = aTime.minute
local nSec = aTime.second
local sLogFile = ':' .. getResourceName( resource ) .. '/log/' .. nMonthday ..'.' .. nMonth .. '.' .. nYear
local sLogMessage = '[' .. nHour .. nMin .. nSec .. '] ' .. getPlayerName( source ) .. ': ' .. sMsg
local pFile = fileExists( sLogFile ) and fileOpen( sLogFile ) or fileCreate( sLogFile )
local sText = ''
while not fileIsEOF( pFile ) do
sText = sText .. fileRead( pFile, 500 )
end
fileWrite( pFile, sText .. sLogMessage )
fileClose( pFile )
end
end
addEventHandler( 'onPlayerChat', root, OnPlayerChat )
562141
guiSetVisible
showCursor
https://wiki.multitheftauto.com/wiki/OnClientPlayerSpawn