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

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


Post New Thread Reply   
 
Thread Tools Display Modes
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 08-09-2012 , 17:15   Re: [CS:S] Change Player's Name
Reply With Quote #21

I had a demo of it somewhere... I'll see if I can jump on my test server today and get it... if it's not there, I'll do another demo.
__________________
View my Plugins | Donate
TnTSCS is offline
sparkey
Senior Member
Join Date: May 2010
Old 08-11-2012 , 21:06   Re: [CS:S] Change Player's Name
Reply With Quote #22

Quote:
Originally Posted by TnTSCS View Post
I had a demo of it somewhere... I'll see if I can jump on my test server today and get it... if it's not there, I'll do another demo.
Big thanks Thanks again for your time!
sparkey is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 03:17   Re: [CS:S] Change Player's Name
Reply With Quote #23

i did find a way to change players' name by calling CBaseClient::SetName() but it requires an extension as it turned out that you cant make an SDKCall for CBaseClient (thanks Afronanny for saving me from wasting more time) . As there's no Makefile for CS:GO i'm still trying to figure it out how to compile it for linux but it's definitely working. (Maybe I should submit a patch to support CBaseClient in SDKCalls instead or maybe theres a reason why its not supported by default?)
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-15-2012 , 06:46   Re: [CS:S] Change Player's Name
Reply With Quote #24

Quote:
Originally Posted by Zephyrus View Post
i did find a way to change players' name by calling CBaseClient::SetName()
Does it actually work? I think psychonic tried this for CS:S and it had no effect.

Quote:
Originally Posted by Zephyrus View Post
it requires an extension as it turned out that you cant make an SDKCall for CBaseClient (thanks Afronanny for saving me from wasting more time)
That's what SDKCall_Raw is for. You should be able to do this in pawn.
__________________
GoD-Tony is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 07:12   Re: [CS:S] Change Player's Name
Reply With Quote #25

Quote:
Originally Posted by GoD-Tony View Post
Does it actually work? I think psychonic tried this for CS:S and it had no effect.

That's what SDKCall_Raw is for. You should be able to do this in pawn.
oh it does at least in CSGO, ive written an extension that im actively using on my servers also theres no such thing as sdkcall_raw in the docs

also how would i get the CBaseClient pointer in pawn for a raw call
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 08-15-2012 at 07:22.
Zephyrus is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-15-2012 , 08:25   Re: [CS:S] Change Player's Name
Reply With Quote #26

Quote:
Originally Posted by Zephyrus View Post
also how would i get the CBaseClient pointer in pawn for a raw call
Very weird. I can make CBaseClient calls just fine in CS:S but in CS:GO it crashes. I'm probably missing something, but unfortunately I have lost interest. Edit: Now it works.

An example of working with CBaseServer and CBaseClient in pawn...
Attached Files
File Type: zip SetName.zip (1.6 KB, 1105 views)
__________________

Last edited by GoD-Tony; 02-14-2015 at 12:17. Reason: Updated CS:GO gamedata.
GoD-Tony is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 08:29   Re: [CS:S] Change Player's Name
Reply With Quote #27

Quote:
Originally Posted by GoD-Tony View Post
Very weird. I can make CBaseClient calls just fine in CS:S but in CS:GO it crashes. I'm probably missing something, but unfortunately I have lost interest.

An example of working with CBaseServer and CBaseClient in pawn...
those offsets for SetName are wrong, correct ones:

"windows" "18"
"linux" "64"
"mac" "64"
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 08-15-2012 at 08:29.
Zephyrus is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-15-2012 , 10:01   Re: [CS:S] Change Player's Name
Reply With Quote #28

Quote:
Originally Posted by GoD-Tony View Post
Does it actually work? I think psychonic tried this for CS:S and it had no effect.

That's what SDKCall_Raw is for. You should be able to do this in pawn.
I didn't try CBaseClient::SetName, it was gamerules or player set/changeplayername. I forget the exact function.
psychonic is offline
sparkey
Senior Member
Join Date: May 2010
Old 08-15-2012 , 10:22   Re: [CS:S] Change Player's Name
Reply With Quote #29

Quote:
Originally Posted by Zephyrus View Post
oh it does at least in CSGO, ive written an extension that im actively using on my servers also theres no such thing as sdkcall_raw in the docs

also how would i get the CBaseClient pointer in pawn for a raw call
Would you mind sharing that extension? : )
sparkey is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-15-2012 , 10:39   Re: [CS:S] Change Player's Name
Reply With Quote #30

Quote:
Originally Posted by sparkey View Post
Would you mind sharing that extension? : )
i will try it in CSS first, if it works it will probably get into official sourcemod features
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus 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 08:26.


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