What hallux said. Those that feel like it can add columns to the table for other identifiers if they care, but I only log the ones that are really relevant.
However, this will fill up databases like crazy as it duplicates entires. I joined once, restarted, joined again and there’s now two entires of me joining. Is this a bug? Did I install it wrong?
This is intentional. It will log every instance of someone connecting (successfully, spawning into the server). This is so you can log players over time.
If absolutely required you can “clean up” every so often by removing old entries with a simple query.
That said, you can have tens of thousands of records in the table and it should not affect performance much provided the mysql server isn’t running on a hamster wheel.
Use the playerconnecting event. This would make it more ‘secure’ and also playerspawnned will execute everytime a player respawns… Using playerconnecting would also make the whole script server-side…
I should probably add a variable so it only fires once…
I don’t use playerConnecting because that fires every time an attempt is made. If the server’s full, the user gets rejected by hardcap but that event is still fired. Some people like spam connecting for whatever reason.
is there a way to make this script log when someone starts and ends there shift im trying to get webhood to log how many hours my workers worked at the end of the week so i can pay them