Simple Player Join Logger
Whipped up in a minute just for funz.
Run "PrintPlayerJoinLog" in Console to show all the connected players that have joined since you joined the server.
It Shows Date and time they joined, Name, Steam ID.
Code:
Players = {}
file.CreateDir("PlayerJoinLogger")
file.Write("PlayerJoinLogger/playersconnected.txt")
function PlayersConnected()
for _, v in ipairs( player.GetAll() ) do
if(not table.HasValue(Players, v)) then
table.insert(Players, v)
file.Append("PlayerJoinLogger/playersconnected.txt", "("..tostring( os.date() )..") Player "..v:Nick().." ("..v:SteamID()..")\n")
end
end
end
hook.Add("Think","PlayersConnected",PlayersConnected)
function PrintPlayers()
if file.Read("PlayerJoinLogger/playersconnected.txt") == nil then
print("No players have joined!")
else
print(file.Read("PlayerJoinLogger/playersconnected.txt"))
end
end
concommand.Add( "PrintPlayerJoinLog", PrintPlayers )
why not use the PlayerConnect hook?
There's a sticky thread where you should post small scripts like this.
Also what would be a practical usage example of this?
It is useful to just print to console their shit instead of getting steamid. Also you get the date and time :3
How is this cheating exactly?
It's not fellow myg0tian.