Skip to content

Does anyone know how to change a player's name? #830

Discussion options

You must be logged in to vote

Ah, never mind, setting it on EventPlayerConnect didn't work, but it does work on EventPlayerConnectFull:

	[GameEventHandler]
	public HookResult OnPlayerConnectFull(EventPlayerConnectFull e, GameEventInfo info)
	{
		if (e.Userid?.IsValid is false or null)
			return HookResult.Continue;
		if (e.Userid.IsBot || e.Userid.IsHLTV)
			return HookResult.Continue;

		e.Userid.PlayerName = "Test";

		return HookResult.Continue;
	}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AshleighAdams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant