I had a similar pluigin running using an Eventscript for CS:S ages ago but I can't use Eventscripts with
TF2
What I'm wanting is for a quick method for my regular players to add a a predefined
tag to their in-game name to show support to our clan / server.
Any player can type "!addme" and the
tag as defined by a cvar is added to the end of their name.
So let's say I defined the
tag to be "|Evil" with a cvar something like sm_customtag "|Evil"
Then let's say you come on the server and type "!addme" in chat.
The plugin will then add "|Evil" to the end of your in-game name.
Now here's the interesting part: as a name change will only last until the end of the map in
TF2 (player's names are pulled from the nick defined in Steam Friends settings) then a SQL-lite database is used to store your SteamID and remembers you so that after the map change and for each and every time you connect to the server afterwards you will get "|Evil" added to your in-game name.
A command like "!removeme" will be used for removing a player from the SQL-lite database and stopping the autonamer from running on them.
A great additional cvar to make this useful for other admins would also be to decide whether the tag is added to the end of a player's name or in front of it. (I choose after it)
There's an apparent difficulty to overcome in changing a players name in
TF2.
As I said already an in-game nick is handled by the name set in Steam Friends options
but if I can change name in console using :
Code:
setinfo name <NEWNAME>
This change is only temporary though, hence the requirement for SQL-Lite support.
__________________