Opened 10 years ago
Closed 3 years ago
#8 closed enhancement (fixed)
Add player position logging/drawing
Reported by: | Alloc | Owned by: | Alloc |
---|---|---|---|
Priority: | minor | Component: | Server fixes |
Keywords: | Cc: |
Description
Log positions of players to a DB (time, steamid?, nick, position). Could be used on a website to interactively follow players.
Alternatively simply draw positions in a file like in this script.
Attachments (1)
Change History (8)
Changed 10 years ago by Alloc
comment:1 Changed 10 years ago by Alloc
lp-output:
<counter>. id=<entityid>, <nickname>, pos=(-1418.5, 61.0, 104.5), rot=(0.0, 0.0, 0.0), remote=True, health=100, <steam guid64>
Total of <num players> in the game
comment:2 Changed 10 years ago by H3llGhost
In general I would prefer database logging to be more flexible.
For this idea it would be also good to be able to store other file values like players.xml and similar in the database (configuration parameter).
comment:3 Changed 10 years ago by Alloc
Disadvantage of a real DB: another dependency ;)
Depending on the system it might even draw in quite a lot stuff. Configurable storage backend would probably be the best solution but also the one requiring the most work.
Maybe the easiest way is to have another "hook" that is called on a regular base (like once a minute) getting passed the currently logged in players and their coordinates. This way dumping everything to a DB of choice would be quite easy. And I could provide simple hooks for MySQL.
comment:4 Changed 10 years ago by H3llGhost
If you don't want another dependency, the second way with a "hook" would be good enough.
Everyone is able to use the data like they want to.
I would say the best approach would be a cronjob similar system but we have to consider the telnet issues some players reported or trying to use another data source.
comment:5 Changed 10 years ago by Alloc
- Component set to Scripts
- Owner set to Alloc
comment:6 Changed 7 years ago by Alloc
- Component changed from Scripts to Server fixes
- Status changed from new to accepted
This would actually belong in the mod and is definitely planned for when a DB is added.
comment:7 Changed 3 years ago by Alloc
- Resolution set to fixed
- Status changed from accepted to closed
Hopefully in the overhaul
From https://gist.github.com/oberhamsi/10415802