All pastes #2102846 Raw Edit

Untitled

public text v1 · immutable
#2102846 ·published 2012-01-13 22:12 UTC
rendered paste body
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;
}