- Added name to message

- Fixed format issue
This commit is contained in:
Kyle Bradley 2021-03-02 16:35:29 +02:00
parent 44bd43f38b
commit 2c11fedfb0
2 changed files with 5 additions and 3 deletions

View file

@ -31,8 +31,10 @@ CHAT_COMMAND("swap", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConSwap,
CHAT_COMMAND("save", "?r[code]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConSave, this, "Save team with code r.")
CHAT_COMMAND("load", "?r[code]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConLoad, this, "Load with code r. /load to check your existing saves")
CHAT_COMMAND("map", "?r[map]", CFGFLAG_CHAT | CFGFLAG_SERVER | CFGFLAG_NONTEEHISTORIC, ConMap, this, "Vote a map by name")
CHAT_COMMAND("rankteam", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamRank, this, "Shows the team rank of player with name r (your team rank by default)")
CHAT_COMMAND("teamrank", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamRank, this, "Shows the team rank of player with name r (your team rank by default)")
CHAT_COMMAND("rank", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRank, this, "Shows the rank of player with name r (your rank by default)")
CHAT_COMMAND("top5team", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")
CHAT_COMMAND("teamtop5", "?s[player name] ?i[rank to start with]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeamTop5, this, "Shows five team ranks of the ladder or of a player beginning with rank i (1 by default, -1 for worst)")

View file

@ -732,8 +732,8 @@ void CGameContext::ConSwap(IConsole::IResult *pResult, void *pUserData)
return;
}
CPlayer *pSwapPlayer = pSelf->m_apPlayers[TargetClientId];
CPlayer *pSwapPlayer = pSelf->m_apPlayers[TargetClientId];
bool SwapPending = pSwapPlayer->m_ClientSwapID != pResult->m_ClientID;
if(SwapPending)
{
@ -741,7 +741,7 @@ void CGameContext::ConSwap(IConsole::IResult *pResult, void *pUserData)
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "swap", "Swap request sent. The player needs to confirm it.");
char aBuf[512];
str_format(aBuf, sizeof(aBuf), "'%s' has requested to swap positions with you. Type /swap to confirm the swap.", pSelf->Server()->ClientName(pResult->m_ClientID));
str_format(aBuf, sizeof(aBuf), "'%s' has requested to swap positions with you. Type /swap %s to confirm the swap.", pSelf->Server()->ClientName(pResult->m_ClientID));
pSelf->SendChatTarget(TargetClientId, aBuf);
return;