bool ResetMatch::OnChat(int PlayerID,TextMessageEnum Type,const wchar_t *Message,int recieverID)
{
if (!MatchHasStarted)
{
if (Message[0] == L'!')
{
if (wcsistr(Message,L"!ready") == Message)
{
ReadyList.Add(Get_Player_Name_By_ID(PlayerID));
if (Is_Every_Player_Ready() == true)
{
Reset_Match();
}
}
}
else
{
PPage(PlayerID, GREEN, "You can't move and the match won't start until every player has typed !ready");
PPage(PlayerID, GREEN, "or untill two minutes have expired.");
}
}
return true;
}