Raised This Month: $ Target: $400
 0% 

[REQ] simple player rename for tf2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
halbblah
Member
Join Date: Feb 2007
Location: Germany
Old 07-21-2009 , 15:04   [REQ] simple player rename for tf2
Reply With Quote #1

Hello!

in TF2 the playername is derived from the steam-friends-list. But temporary renaming is possible by typing "setinfo name MyNewName" in console.

it seems not to be possible to rename the players that way with Eventscripts, because Valve restricted the command.

the plugin just would have to check if the executing user is an admin and would take 2 parameters - the steamid of the targeting player and the new name

Is it possible to do this with sourcemod ? if so, would anyone write this little plugin ? would be awesome
halbblah is offline
psychonic

BAFFLED
Join Date: May 2008
Old 07-21-2009 , 15:18   Re: [REQ] simple player rename for tf2
Reply With Quote #2

It's built into sourcemod

sm_rename
psychonic is offline
halbblah
Member
Join Date: Feb 2007
Location: Germany
Old 07-21-2009 , 16:09   Re: [REQ] simple player rename for tf2
Reply With Quote #3

oh nice! thanks! at first it said "unknown command". I searched in the documentation and found that the playercommands plugin has to be installed. It still didn't work till I installed the newest SM version.

unfortunatly now the command is recognized but still not working correctly:
Quote:
sm_rename STEAM_0:0:123456 testname
[SM] No matching client was found.
even when I enclose both parameters with quotes...

I tried to rename myself via server console. I am an admin, are they immune ? is that the problem ? if so, is there any way to override this ?
halbblah is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-21-2009 , 16:37   Re: [REQ] simple player rename for tf2
Reply With Quote #4

I thought it's
PHP Code:
sm_rename <#id|name> <newname> 
not with steamid?
Gachl is offline
halbblah
Member
Join Date: Feb 2007
Location: Germany
Old 07-21-2009 , 16:51   Re: [REQ] simple player rename for tf2
Reply With Quote #5

when the userid is the number that you get with "status", than no - doesn't work. Neither with quotes nor without :/

Quote:
status
hostname: TF2 Server
version : 1.0.6.2/15 3897 insecure
udp/ip : 123.123.2.12:27015
map : ctf_2fort at: 0 x, 0 y, 0 z
players : 1 (4 max)

# userid name uniqueid connected ping loss state adr
# 2 "thatsme" STEAM_0:0:1234567 02:18 34 0 active 123.123.1.12:27006
sm_rename
[SM] Usage: sm_rename <#userid|name> [newname]
sm_rename 2 test
[SM] No matching client was found.
sm_rename "2" test
[SM] No matching client was found.
sm_rename "2" "test"
[SM] No matching client was found.
sm version
SourceMod Version Information:
SourceMod Version: 1.2.1
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.2.1)
SourcePawn API: v1 = 4, v2 = 3
Compiled on: May 31 2009 00:02:13
Build ID: 2708:69195a250d70
http://www.sourcemod.net/

Last edited by halbblah; 07-21-2009 at 16:54.
halbblah is offline
psychonic

BAFFLED
Join Date: May 2008
Old 07-21-2009 , 17:55   Re: [REQ] simple player rename for tf2
Reply With Quote #6

If using a userid, instead of a name, you must prefix the userid with # as shown in the command description.

PHP Code:
sm_rename <#id|name> <newname> 
sm_rename #2 "test" 
psychonic is offline
Nataraja
Member
Join Date: Jan 2010
Old 01-20-2010 , 03:49   Re: [REQ] simple player rename for tf2
Reply With Quote #7

In L4D2, It still can't work with "sm_rename #2 MyNewName"
Nataraja is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-20-2010 , 08:18   Re: [REQ] simple player rename for tf2
Reply With Quote #8

Quote:
Originally Posted by Nataraja View Post
In L4D2, It still can't work with "sm_rename #2 MyNewName"
windows or linux?
psychonic is offline
DarkWolff
Junior Member
Join Date: Jan 2010
Old 02-10-2010 , 19:57   Re: [REQ] simple player rename for tf2
Reply With Quote #9

Quote:
Originally Posted by psychonic View Post
windows or linux?
I'm having the same problem in L4D2 on a windows server.
DarkWolff is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-12-2010 , 18:47   Re: [REQ] simple player rename for tf2
Reply With Quote #10

Quote:
Originally Posted by DarkWolff View Post
I'm having the same problem in L4D2 on a windows server.
I found the issue and am filing a bug report with fix now.

Edit: apparently a bug report already exists for it and has the fix listed that I found. Could have saved myself some time
https://bugs.alliedmods.net/show_bug.cgi?id=4131
psychonic is offline
Reply



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 15:59.


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