Raised This Month: $ Target: $400
 0% 

[TF2] Auto Renaming with SteamID?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Marverlous
Senior Member
Join Date: May 2013
Old 10-12-2014 , 17:01   [TF2] Auto Renaming with SteamID?
Reply With Quote #1

Hello y'all! Would anyone be kind enough to craft a plugin that automatically rename a player with specific SteamID? It's like "Custom Chat Color" but instead of tag/name color, it rename the player. Thanks for reading this, you have my gratitude.
__________________

Last edited by Marverlous; 10-12-2014 at 19:34.
Marverlous is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-13-2014 , 04:33   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #2

Not tested.
Donate if you like my plugin

EDIT: Do not use.
__________________
Want to check my plugins ?

Last edited by Arkarr; 10-17-2014 at 03:32.
Arkarr is offline
Marverlous
Senior Member
Join Date: May 2013
Old 10-13-2014 , 18:30   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #3

You're awesome! Sorry for not being clear enough, I mean renaming based on their steamid. For example if you enter
Quote:
"Steamid xxxy" "Mr. Meow"
in a config, everytime a person with Steamid "Steamid xxxy" join the server, it automatically rename them to "Mr. Meow"

You're the best, I would donate if I could, at the moment all I have to offer is my gratitude and the knowledge that you have a special place in my heart.
__________________
Marverlous is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-13-2014 , 19:26   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #4

Erf, first, thanks and second... Well, I'm kinda tired right now, will do this tomorrow.
__________________
Want to check my plugins ?
Arkarr is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-14-2014 , 06:11   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #5

Here, updated ! Do not forget to check the config file ! (sourcemod/configs/steamid_renamer.txt)
To install, simply extract the zip archive into your sourcemod folder.

EDIT: Do not use.
__________________
Want to check my plugins ?

Last edited by Arkarr; 10-17-2014 at 03:32.
Arkarr is offline
Marverlous
Senior Member
Join Date: May 2013
Old 10-14-2014 , 19:08   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #6

Wonderful, will test it right away!
__________________
Marverlous is offline
Marverlous
Senior Member
Join Date: May 2013
Old 10-15-2014 , 22:43   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #7

Worked flawlessly. It broke "Custom Chat Color" 's name color feature, though. How would I fix this?
__________________
Marverlous is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-16-2014 , 04:40   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #8

Quote:
Originally Posted by Marverlous View Post
Worked flawlessly. It broke "Custom Chat Color" 's name color feature, though. How would I fix this?
Really hum... I have to edit Custom Chat Color, I guess. Someone can confirm this ?
__________________
Want to check my plugins ?
Arkarr is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 10-16-2014 , 17:28   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #9

Code:
new Handle:Array_SteamIDName = INVALID_HANDLE;
Kv? Enum hack? Anyone?

Code:
public Action:Timer_Rename(Handle:timer, any:client)
{
    RenamePlayer(client);
    return Plugin_Stop;
}

[...]

CreateTimer(0.5, Timer_Rename, client, TIMER_FLAG_NO_MAPCHANGE);
Wow.

Code:
    new Handle:fileHandle=OpenFile(path,"r");
    while(!IsEndOfFile(fileHandle)&&ReadFileLine(fileHandle,line,sizeof(line)))
    {
Wow.

Code:
        ExplodeString(line, "->", steamid_name, sizeof steamid_name, sizeof steamid_name[]);
        PushArrayString(Array_SteamIDName, steamid_name[0]);
        PushArrayString(Array_SteamIDName, steamid_name[1]);
wtf. See first comment. Also 0 verification.

Code:
    GetClientAuthString(client, steam_id, sizeof(steam_id));
Wow.

Code:
    new index = FindStringInArray(Array_SteamIDName, steam_id);
    if(index != -1)
    {
        decl String:new_name[100];
        GetArrayString(Array_SteamIDName, index+1, new_name, sizeof(new_name));
        SetClientInfo(client, "name", new_name);
    }
}
See wtf from earlier.


Please do not use this.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 10-16-2014 at 17:30.
Dr. Greg House is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-17-2014 , 03:37   Re: [TF2] Auto Renaming with SteamID?
Reply With Quote #10

Yeah, well, I thought it would be better to use a simple text file to do this, but apparently, it was a bad idea also, all those small piece of code as been found here and here and I thought there was 0 problem using them...

And what's wrong with this ?

Quote:
Originally Posted by Dr. Greg House View Post
Wow.

Code:
    new index = FindStringInArray(Array_SteamIDName, steam_id);
    if(index != -1)
    {
        decl String:new_name[100];
        GetArrayString(Array_SteamIDName, index+1, new_name, sizeof(new_name));
        SetClientInfo(client, "name", new_name);
    }
}
See wtf from earlier.
__________________
Want to check my plugins ?
Arkarr is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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