[Release] Player Logging - Log Those People That Get Away! [1.2]

Player Logger - By FAXES

About
Ever been in the process of banning someone, but as your typing in the command, they leave? Well, this just might help you. This simple script saves all people that connect to the server in a log. This logs their; game name, steam hex, game license key and it also adds a timestamp! This is a very basic script but its a great utility for the non-framework servers that rely on file banning (Eg; Easy Admin) etc. So hopefully this helps someone :smiley:

In the Download

__resource.lua
server.lua

Pictures


Features

  • Player name logging
  • Player steam hex logging
  • Player game license logging
  • Timestamps
  • Easy to read for me at least
  • Tons of configuration. From the file name to the location.
  • Easy for anyone
  • NEW Server export function so you can use other resources to log actions!

Requirements
None. This is a standalone script duh.

Server Export Function
So how does one use the server exported function in their script?

Well, all you have to do is add the below line into a server-side script! Make sure to change the PlayerLogger part to the Player Loggers resource name you have!

exports.PlayerLogger:FaxActionLog(source, "STRING* text")

Replace "STRING* text" with the action you want to log eg; "Player Kicked"

Simple!

Downloads:

Installation
Place in your resources folder, just like any other NORMAL resource.

If you have any issues or comments please put them below. :christmas_tree:

10 Likes

why do you have the server password script in this ?

??? Dont tell me I uploaded the wrong thing…

2 Likes

Welp thats fixed!!!

2 Likes

yeah you’re defs aussie xD

1 Like

Niceeeee like the way you have done this, I did it a little different when I made mine

https://gyazo.com/b9b167bbf90b3f304a61d7c98a0df632

Very simular. Did I steal your idea?? :smiley:

2 Likes

Nah :joy: not really an idea just a little script. Good work tho. I believe in sharing as this community is cancerous enough already, without more saltiness.

3 Likes

haha True. Sharing is caring, which leads into people stealing scripts then re-uploading to the forums

:smiley:

Thats why I have these bundles of joy

I like the way you have done it tho, my way of storing the date and time is much different and longer. Might use yours.

1 Like

haha, yeah just used normal lua sh*t. But hopefully people like the config. I try to make configs the biggest it can be :slightly_smiling_face:

Nice. I knew os.time was a thing but not os.date so I had to do quite a bit of math to get the correct values.

1 Like

Yeah alot of people don’t seem to use os.date idk why its so much better in my opinion.

1 Like

I am gonna have to remove this as I reject connections if steam is not booted. :slight_smile:

 if identifierSteam == nil then
        identifierSteam = "N/A"
    end
    if identifierRock == nil then
        identifierRock = "N/A"
    end
1 Like

nah. Thats just so the script has no errors and replaces with N/A. Steam checks should execute before scripts do…

Steam checks are built into scripts?

Havent had time to check this out, but with will this have ip logging aswell? Its still a reliable identifier for me because its another way of keeping them off the server for a month or 2.

This should work, haven’t tested it however. @TreyWoods

AddEventHandler('playerConnecting', function()
    local source = source
    local identifierSteam = GetPlayerIdentifiers(source)[1]
    local identifierRock = GetPlayerIdentifiers(source)[2]
    local identifierIP = GetPlayerIdentifiers(source)[5]
	local name = GetPlayerName(source)

    if identifierSteam == nil then
        identifierSteam = "N/A"
    end
    if identifierRock == nil then
        identifierRock = "N/A"
    end
	if identifierIP == nil then
	    identifierIP = "N/A"
	end
    
    writeLog(name, identifierSteam, identifierRock, identifierIP)
end)

These indexes won’t always be the same. Since there is xbl: and live: identifiers on new server artifacts. Might want to check make a check, something like this:

for k,v in ipairs(GetPlayerIdentifiers(source))do
    if string.sub(v, 1, string.len("steam:")) == "steam:" then
        steam = v
        break
    elseif string.sub(v, 1, string.len("license:")) == "license:" then
        license = v
        break
    elseif string.sub(v, 1, string.len("ip:")) == "ip:" then
        ip = v 
        break
    end
end
1 Like

Thank you!