suppress the message if it's from the menu

This commit is contained in:
yupi2 2017-09-08 22:34:50 +00:00 committed by GitHub
parent b813f00945
commit 2a1534350f

View File

@ -1410,7 +1410,7 @@ public Action Command_Tele(int client, int args)
return Plugin_Handled;
}
TeleportToCheckpoint(client, index);
TeleportToCheckpoint(client, index, false);
return Plugin_Handled;
}
@ -1497,7 +1497,7 @@ public int MenuHandler_Checkpoints(Menu menu, MenuAction action, int param1, int
case 1:
{
TeleportToCheckpoint(param1, current - 1);
TeleportToCheckpoint(param1, current - 1, true);
}
case 2:
@ -1573,7 +1573,7 @@ void SaveCheckpoint(int client, int index)
Shavit_SaveSnapshot(client, gA_CheckpointsSnapshots[client][index]);
}
void TeleportToCheckpoint(int client, int index)
void TeleportToCheckpoint(int client, int index, bool suppressMessage)
{
if(index < 0 || index >= CP_MAX || IsNullVector(gF_Checkpoints[client][index][0]))
{
@ -1609,7 +1609,10 @@ void TeleportToCheckpoint(int client, int index)
Shavit_StopTimer(client);
}
Shavit_PrintToChat(client, "%T", "MiscCheckpointsTeleported", client, (index + 1), gS_ChatStrings[sMessageVariable], gS_ChatStrings[sMessageText]);
if(!suppressMessage)
{
Shavit_PrintToChat(client, "%T", "MiscCheckpointsTeleported", client, (index + 1), gS_ChatStrings[sMessageVariable], gS_ChatStrings[sMessageText]);
}
}
public Action Command_Noclip(int client, int args)