AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ] 'tag-up' with SQL-lite support (https://forums.alliedmods.net/showthread.php?t=68136)

Extreme_One 03-09-2008 06:43

[REQ] 'tag-up' with SQL-lite support
 
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.

Fredd 03-09-2008 07:07

Re: [REQ] 'tag-up' with SQL-lite support
 
i have been trying to make something similar using sqlite, but it just fails me..i might just make a mysql version soon..

FrostbyteX 03-12-2008 12:37

Re: [REQ] 'tag-up' with SQL-lite support
 
I wrote a plugin that is similar to what you want ...

Two commands:
sm_addmember <name|#userid>
sm_removemember <name|#userid>

One cvar:
sm_clantag <tag>

The addmember command does the following:
1. Strips the clan tag from the member if they are wearing it and stores their name in a sqlite database.
2. Renames the member with the correct clan tag in their name.

Whenever a player joins the server, the plugin queries the database and changes their name to the stored value. If they try to change their name, it changes it back.

If someone tries to put on the clan tag and they are not stored in the database, it kicks them.

Is this what you want?

Steve

Extreme_One 03-12-2008 15:35

Re: [REQ] 'tag-up' with SQL-lite support
 
This is very very close to what I want. Thank you.

And it works with TF2 ?

Is there any chance it could be changed very slightly?

sm_addmember -> sm_addme
sm_removemember -> sm_removeme

A connected client can run the command on himself (no need to set a target : the plugin targets the player that runs the command)

Quote:

If someone tries to put on the clan tag and they are not stored in the database, it kicks them.
I also would like the ability to disable this.

The main reason for wanting the changes I've described is to encourage our regulars to wear a tag showing support for our server.

I hope that makes sense. I'd really appreciate it if this could be done. +1 karma

FrostbyteX 03-12-2008 17:48

Re: [REQ] 'tag-up' with SQL-lite support
 
Modifications should be easy. Busy all day tomorrow but will try to get done tonight.

Extreme_One 03-12-2008 18:27

Re: [REQ] 'tag-up' with SQL-lite support
 
Quote:

Originally Posted by FrostbyteX (Post 596199)
Modifications should be easy. Busy all day tomorrow but will try to get done tonight.

No hurry :) Thanks again.

And you've tested in TF2? Setting a player's name works differently in TF2 AFAIK

Also I've looked again at what you described before : the original sounds like a great plugin for clan tagging and should be released as a separate plugin IMO.:up:

Extreme_One 03-19-2008 06:58

Re: [REQ] 'tag-up' with SQL-lite support
 
Any news on this FrostbyteX ?

Extreme_One 03-21-2008 18:59

Re: [REQ] 'tag-up' with SQL-lite support
 
Here's an AMX plugin that does the same : obviously TF2 needs SQLite support for the returning clients and for the plugin to work in TF2 it needs to use a completely different method of changing the clients name.


All times are GMT -4. The time now is 04:26.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.