Change sm_rename to use new SetClientName native.
This commit is contained in:
@@ -37,22 +37,8 @@ PerformRename(client, target)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" renamed \"%L\" to \"%s\")", client, target, g_NewName[target]);
|
||||
|
||||
/* Used on OB / L4D engine */
|
||||
if (g_ModVersion != Engine_SourceSDK2006)
|
||||
{
|
||||
SetClientInfo(target, "name", g_NewName[target]);
|
||||
}
|
||||
else /* Used on CSS and EP1 / older engine */
|
||||
{
|
||||
if (!IsPlayerAlive(target)) /* Lets tell them about the player renamed on the next round since they're dead. */
|
||||
{
|
||||
decl String:m_TargetName[MAX_NAME_LENGTH];
|
||||
SetClientName(target, g_NewName[target]);
|
||||
|
||||
GetClientName(target, m_TargetName, sizeof(m_TargetName));
|
||||
ReplyToCommand(client, "[SM] %t", "Dead Player Rename", m_TargetName);
|
||||
}
|
||||
ClientCommand(target, "name %s", g_NewName[target]);
|
||||
}
|
||||
g_NewName[target][0] = '\0';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user