Raised This Month: $12 Target: $400
 3% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-19-2012 , 04:47   Re: [CS:S] Change Player's Name
Reply With Quote #41

Quote:
Originally Posted by Zephyrus View Post
CBaseClient::SetName works in CSS as well, sdktools aptch is comiing
Ah, I was missing pClient - 4. The pawn version now works!
__________________
GoD-Tony is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-19-2012 , 04:56   Re: [CS:S] Change Player's Name
Reply With Quote #42

Quote:
Originally Posted by GoD-Tony View Post
Ah, I was missing pClient - 4. The pawn version now works!
ive already submitted an sdktools patch with a new SetClientName native with offsets for CSGO and EP2V engine
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-19-2012 , 05:00   Re: [CS:S] Change Player's Name
Reply With Quote #43

Quote:
Originally Posted by Zephyrus View Post
ive already submitted an sdktools patch with a new SetClientName native with offsets for CSGO and EP2V engine
Yea that's what I was referencing. I was just curious as to why mine was failing while yours worked. Plus it's cool to see how powerful the pawn features have become.

Regardless of all that, thanks for the submitting the patch. The CS games have needed a SetClientName native for a while now.
__________________
GoD-Tony is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 08-20-2012 , 02:16   Re: [CS:S] Change Player's Name
Reply With Quote #44

Does the submitted native only do the above ?

And if not, does it forces networking the new name ? Or is there a way to force networking a new name, so in the same frame the name can be changed? (Currently, if you change someone's name, it takes some time to get networked; i.e. "0.1" sec or so; before you can see a killer's right name top-right corner).

I tried to do something in one of my plugin long time ago like "Bob + RedSword WEAPONICON John", as if "RedSword" assisted Bob in killing John.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-20-2012 , 02:23   Re: [CS:S] Change Player's Name
Reply With Quote #45

I think its instant, CBaseClient::SetName is the function itself that overwrites the name buffer directly if i understood the asm correctly, also the new native will be present in the sdktools extension
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 08-20-2012 , 16:15   Re: [CS:S] Change Player's Name
Reply With Quote #46

Quote:
Originally Posted by Zephyrus View Post
I think its instant, CBaseClient::SetName is the function itself that overwrites the name buffer directly if i understood the asm correctly, also the new native will be present in the sdktools extension
You might be right, but it seems it takes ~ 10 frames to network someone's name.

I tried to do something similar to this, but you can't do a name change as fast in Source engine it seems.

(He does it on event pre / post in Gold Source while I need to wait ~ 10 frames before refireing the event and changing someone's name back in Source).

Do you think there is a way to force networking a name change ? (And is the limitation to change name client side or server side you think ? like if I was to find a UPD packet concerning name change... )

Thanks for your reply,

Red

P.S. in the attachment is what I tried with GoD-Tony's extension (my code is crappy; made to test 1 kill happening no-too-often). I tryed at first only launching the event (line 146+), then doing on event pre/post as in Gold Source (line 64+), then counting a certain amount of frame before setting name back and fireing event (current non-dead code).
Attached Files
File Type: sp Get Plugin or Get Source (setnamefastnetworkedtest.sp - 202 views - 5.3 KB)
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 08-20-2012 at 16:18.
RedSword is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 08-20-2012 , 16:17   Re: [CS:S] Change Player's Name
Reply With Quote #47

i have no idea it should be instant i think but i dont know :w
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 08-28-2012 , 17:38   Re: [CS:S/CS:GO] Change Player's Name
Reply With Quote #48

Since the last update ( https://forums.alliedmods.net/showthread.php?t=193778 ) this does not work.

This https://forums.alliedmods.net/showpo...2&postcount=26 not work too

Any idea how to rename a player by plugin?


EDIT:

I need this stock for my plugin (attached)
Attached Files
File Type: sp Get Plugin or Get Source (hide_attacker.sp - 379 views - 3.0 KB)
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 08-28-2012 at 17:48.
Franc1sco is offline
Send a message via MSN to Franc1sco
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 08-29-2012 , 00:32   Re: [CS:S/CS:GO] Change Player's Name
Reply With Quote #49

Quote:
Originally Posted by Franc1sco View Post
Since the last update ( https://forums.alliedmods.net/showthread.php?t=193778 ) this does not work.

This https://forums.alliedmods.net/showpo...2&postcount=26 not work too

Any idea how to rename a player by plugin?


EDIT:

I need this stock for my plugin (attached)
You could just set the "attacker" name [Get his name first then format it] to "" or NULL_STRING.
__________________
retired

Last edited by shavit; 08-29-2012 at 00:35.
shavit is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 08-29-2012 , 08:13   Re: [CS:S/CS:GO] Change Player's Name
Reply With Quote #50

Quote:
Originally Posted by Franc1sco View Post
This https://forums.alliedmods.net/showpo...2&postcount=26 not work too

Any idea how to rename a player by plugin?
In what way is it not working? According to this thread it still works after the update linked in your post.
__________________
GoD-Tony 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 16:40.


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