Monthly Target: $400 Donations: $269
 67% 

sm_rename


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-26-2012 , 13:45   sm_rename
Reply With Quote #1

sm_rename doasn't work. Is there any way to fix that?
__________________
Velture is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Old 04-26-2012 , 14:55   Re: sm_rename
Reply With Quote #2

Worked fine last time I checked. Please clarify.
__________________
ReFlexPoison is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 04-26-2012 , 15:33   Re: sm_rename
Reply With Quote #3

Quote:
Originally Posted by ReFlexPoison View Post
Worked fine last time I checked. Please clarify.
Doesn't work on CSS, and there is a way to fix it.
http://forums.alliedmods.net/showthread.php?t=161025
minimoney1 is offline
TnTSCS
SourceMod Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-26-2012 , 15:41   Re: sm_rename
Reply With Quote #4

There is a stock provided by GoD-Tony you could implement into a new plugin that works - at least until the map is changed (unless you use another method to actively change the name back to what you want it after map change).

the sm_rename command shipped in SM doesn't work for CS:S - the game just changes the name right back to what the user had - but with the stock mentioned above, you could psuedo'ly change the players name.

Here you go - here's the include GoD-Tony provided:

PHP Code:
/**
 * Changes a clients name
 *
 * @param client        A client index.
 * @param name        Set to false to skip the IsClientConnected check
 * @param silent        Set to true to not broadcast the name change
 * @noreturn
 */
stock CS_SetClientName(client, const String:name[], bool:silent=false)
{
    
decl String:oldname[MAX_NAME_LENGTH];
    
GetClientName(clientoldnamesizeof(oldname));

    
SetClientInfo(client"name"name);
    
SetEntPropString(clientProp_Data"m_szNetname"name);

    new 
Handle:event CreateEvent("player_changename");

    if (
event != INVALID_HANDLE)
    {
        
SetEventInt(event"userid"GetClientUserId(client));
        
SetEventString(event"oldname"oldname);
        
SetEventString(event"newname"name);
        
FireEvent(event);
    }

    if (
silent)
        return;
    
    new 
Handle:msg StartMessageAll("SayText2");

    if (
msg != INVALID_HANDLE)
    {
        
BfWriteByte(msgclient);
        
BfWriteByte(msgtrue);
        
BfWriteString(msg"Cstrike_Name_Change");
        
BfWriteString(msgoldname);
        
BfWriteString(msgname);
        
EndMessage();
    }

__________________
View my Plugins | Donate

Last edited by TnTSCS; 04-26-2012 at 15:43.
TnTSCS is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 04-27-2012 , 14:08   Re: sm_rename
Reply With Quote #5

tf2 server. sm 1.4.0
whenever i type sm_rename player newnick his nick keeps changing into 'name'
__________________
Velture is offline
asherkin
Fennec Fox
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-27-2012 , 14:56   Re: sm_rename
Reply With Quote #6

Quote:
Originally Posted by Velture View Post
sm 1.4.0
Perhaps you should update.
__________________
asherkin is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 05-01-2012 , 21:41   Re: sm_rename
Reply With Quote #7

Updated to 1.4.2 3465
MM 1.8.7

still when trying to use sm_rename nick new_nick it changes player nick into 'name'
__________________
Velture is offline
Snaggle
SourceMod Donor
Join Date: Jul 2010
Location: England
Old 05-01-2012 , 21:51   Re: sm_rename
Reply With Quote #8

Are you doing it with quotes as well? I find not using quotes causes problems.

sm_rename <target> "New Name Quotes"
__________________
- Ach Factory
- Bot Killing
Snaggle is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 05-02-2012 , 08:21   Re: sm_rename
Reply With Quote #9

Quote:
Originally Posted by Snaggle View Post
Are you doing it with quotes as well? I find not using quotes causes problems.

sm_rename <target> "New Name Quotes"
Code:
14:19:25 sm_rename pablo "pablo+"
14:19:25 L 05/02/2012 - 14:19:24: rcon from "xx.xx.xx.xx:xxxxx": command "sm_rename pablo "pablo+""
14:19:25 L 05/02/2012 - 14:19:24: "pablo++<249><STEAM_0:1:32879877><Blue>" changed name to "name"
14:19:26 [SM] Zmieniono nicka pablo++ .  
14:19:26 L 05/02/2012 - 14:19:24: [playercommands.smx] "Console<0><Console><Console>" renamed "pablo++<249><STEAM_0:1:32879877><>" to "pablo+")
I'm so confused..... Why this isn't working on my server.....
__________________

Last edited by Velture; 05-02-2012 at 08:21.
Velture is offline
hobart
Member
Join Date: Dec 2011
Old 05-02-2012 , 19:42   Re: sm_rename
Reply With Quote #10

Same, on mine it renames everyone to name, any plugin that renames does it also like freetobrenamed and steamrep plugin both change names to "name"
hobart 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 11:41.


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