Opened 11 years ago

Closed 3 years ago

#8 closed enhancement (fixed)

Add player position logging/drawing

Reported by: Christian Illy Owned by: Christian Illy
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)

7draw.sh (1.0 KB ) - added by Christian Illy 11 years ago.
From https://gist.github.com/oberhamsi/10415802

Download all attachments as: .zip

Change History (8)

by Christian Illy, 11 years ago

Attachment: 7draw.sh added

comment:1 by Christian Illy, 11 years ago

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 by H3llGhost, 10 years ago

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 by Christian Illy, 10 years ago

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 by H3llGhost, 10 years ago

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 by Christian Illy, 10 years ago

Component: Scripts
Owner: set to Christian Illy

comment:6 by Christian Illy, 7 years ago

Component: ScriptsServer fixes
Status: newaccepted

This would actually belong in the mod and is definitely planned for when a DB is added.

comment:7 by Christian Illy, 3 years ago

Resolution: fixed
Status: acceptedclosed

Hopefully in the overhaul

Note: See TracTickets for help on using tickets.