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

[CS:S/CS:GO] Multiple players with the same name?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 07-13-2017 , 10:23   [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #1

Code:
public void OnClientPutInServer(int client)
{
	if(IsClientSourceTV(client))
	{
		return;
	}

	if(!IsFakeClient(client))
	{
		// irrelevant code
	}

	else
	{
		if(!gB_CentralBot)
		{
			// irrelevant code
		}

		else if(gI_CentralBot == -1)
		{
			SetClientName(client, "!replay");

			gI_CentralBot = client;
		}
	}
}
The thing here, is that if someone joins the server with the name "!replay" - one of the clients (the bot or the real player) will have a suffix appended to their name by the game server. How do I make it so the bot doesn't ever get the forced suffix?
__________________
retired
shavit is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-13-2017 , 11:49   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #2

mabye easier to just rename the player / don't allow those player to connect?
or do bot_join_after_player 0 ?
8guawong is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 07-13-2017 , 12:06   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
mabye easier to just rename the player / don't allow those player to connect?
or do bot_join_after_player 0 ?
My bot changes the name during gameplay too, so that's not a solution.
__________________
retired
shavit is offline
ofir753
Senior Member
Join Date: Aug 2012
Old 07-13-2017 , 14:53   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #4

Quote:
Originally Posted by shavit View Post
My bot changes the name during gameplay too, so that's not a solution.
I dont think you can control the suffix, but im pretty sure you can hook the name changes of the players and kick or block the rename if its !replay or something like that.

If you want multiple bots with the same name you better do something like that, BOT #1 - replay! so it wont suffix.

Last edited by ofir753; 07-13-2017 at 14:53.
ofir753 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 07-14-2017 , 02:48   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #5

Quote:
Originally Posted by ofir753 View Post
If you want multiple bots with the same name you better do something like that, BOT #1 - replay! so it wont suffix.
Thanks! Will do as a partial solution, unless someone comes up with a better idea.
__________________
retired

Last edited by shavit; 07-14-2017 at 02:49.
shavit is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 07-14-2017 , 16:57   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #6

You can also check STEAMID, bot's steamid is "BOT"
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 07-15-2017 , 12:29   Re: [CS:S/CS:GO] Multiple players with the same name?
Reply With Quote #7

Quote:
Originally Posted by BraveFox View Post
You can also check STEAMID, bot's steamid is "BOT"
I honestly don't know how is this related to my question.
__________________
retired
shavit 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:59.


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