Raised This Month: $32 Target: $400
 8% 

[CS:S/CS:GO] Change Player's Name


Post New Thread Reply   
 
Thread Tools Display Modes
sparkey
Senior Member
Join Date: May 2010
Old 08-15-2012 , 11:08   Re: [CS:S] Change Player's Name
Reply With Quote #31

Quote:
Originally Posted by Zephyrus View Post
i will try it in CSS first, if it works it will probably get into official sourcemod features
So it works 100% in CS:GO? : )
sparkey is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 11:18   Re: [CS:S] Change Player's Name
Reply With Quote #32

Quote:
Originally Posted by sparkey View Post
So it works 100% in CS:GO? : )
yes
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
sparkey
Senior Member
Join Date: May 2010
Old 08-15-2012 , 11:34   Re: [CS:S] Change Player's Name
Reply With Quote #33

Quote:
Originally Posted by Zephyrus View Post
yes
nice, well i guess i have to wait then if you don't want to share the extension.
sparkey is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 11:35   Re: [CS:S] Change Player's Name
Reply With Quote #34

Quote:
Originally Posted by sparkey View Post
nice, well i guess i have to wait then if you don't want to share the extension.
i would but i dont have the makefile for linux, i dont want to release it only for windows
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
sparkey
Senior Member
Join Date: May 2010
Old 08-15-2012 , 11:39   Re: [CS:S] Change Player's Name
Reply With Quote #35

Quote:
Originally Posted by Zephyrus View Post
i would but i dont have the makefile for linux, i dont want to release it only for windows
oh okay, i see.
sparkey is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-16-2012 , 04:43   Re: [CS:S] Change Player's Name
Reply With Quote #36

Quote:
Originally Posted by Zephyrus View Post
those offsets for SetName are wrong
Lol, yea after trying asherkin's updated script I see I was way off. I actually did my testing with IClient::Reconnect because I wasn't sure if SetName even had an effect.

If it works for both games then be sure to file a SM bug!
__________________

Last edited by GoD-Tony; 08-16-2012 at 04:44.
GoD-Tony is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 08-17-2012 , 00:43   Re: [CS:S] Change Player's Name
Reply With Quote #37

Why I try it in CS:GO and it was failed
this is my code:
Code:
public OnPluginStart() {     RegConsoleCmd("sm_name", CmdSetName); } public Action:CmdSetName(client, args) {     decl String:szNewName[32];     GetCmdArg(1, szNewName, sizeof(szNewName));     TrimString(szNewName);         if (strlen(szNewName) > 0)     {         CS_SetClientName(client, szNewName);     }     return Plugin_Handled; } stock CS_SetClientName(client, const String:name[], bool:silent=false) {     decl String:oldname[MAX_NAME_LENGTH];     GetClientName(client, oldname, sizeof(oldname));         SetClientInfo(client, "name", name);     SetEntPropString(client, Prop_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(msg, client);         BfWriteByte(msg, true);         BfWriteString(msg, "Cstrike_Name_Change");         BfWriteString(msg, oldname);         BfWriteString(msg, name);         EndMessage();     } }
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Mitchell
~lick~
Join Date: Mar 2010
Old 08-18-2012 , 14:03   Re: [CS:S] Change Player's Name
Reply With Quote #38

Maybe it's because CS:GO is going to be for platforms like Xbox and PS3, so name changes don't really happen in game..
Mitchell is offline
sparkey
Senior Member
Join Date: May 2010
Old 08-18-2012 , 19:09   Re: [CS:S] Change Player's Name
Reply With Quote #39

Quote:
Originally Posted by Mitchell View Post
Maybe it's because CS:GO is going to be for platforms like Xbox and PS3, so name changes don't really happen in game..
Yea possibly, but i really hope that this can be bypassed with sourcemod someday soon
sparkey is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-19-2012 , 04:10   Re: [CS:S] Change Player's Name
Reply With Quote #40

CBaseClient::SetName works in CSS as well, sdktools aptch is comiing
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus 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 19:00.


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