All pastes #84563 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-07-11 02:06 UTC
rendered paste body
void SetPlayerName(edict_t *pEntity, const char *pName)
{
	if (!pEntity || pEntity->IsFree()) return;

	CPlayerState *pl = g_ServerClients->GetPlayerState(pEntity);
	if (pl)
	{
		pl->netname = MAKE_STRING(pName);
	}
	else META_CONPRINTF("Failed to set player name for entindex %d\n", g_Engine->IndexOfEdict(pEntity));
}