Another Problem
#1

This is my code for the dm event system:

Код:
public AtriDmStartTime()
{
	new string[30];
	DmEventCountDown--;

	if(DmEventCountDown == 30)
	{
		SendClientMessageToAll(0x00FF00FF, "[EVENT]: {FFFFFF}Only 30 seconds left, /join before event starts.");
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{

	    	if(IsPlayerInEvent[i] == true)
	    	{
				if(DmEventCountDown > 0)
				{
					format(string, sizeof(string), "Time Left: %d", DmEventCountDown);
	    			GameTextForPlayer(i, string, 5000, 3);
				}
				else if(DmEventCountDown == 0)
				{
					if(PlayersJoinedEvent <= 1)
					{
						SendClientMessageToAll(0xFF0000AA, "[EVENT]: {FFFFFF}The event has been cancled, Not enough players!");
						IsPlayerInEvent[i] = false;
					 	PlayersJoinedEvent = 0;
						AtriDM = 0;
					 	SetPlayerHealth(i, 0);
						DmEventCountDown = 60;
		   				SetPlayerInterior(i, 0);
						DmEventTimerVar = SetTimer("DmEventT", 1800000, false);
						KillTimer(Event1SecT);
					}
					else if(PlayersJoinedEvent > 1 && IsPlayerInEvent[i] == true)
					{
						SendClientMessage(i, 0x00FF00AA, "[EVENT]: {FFFFFF}You have been unfrozen, be the last man standing to win the prize!");
		                TogglePlayerControllable(i,1);      
				    	GameTextForPlayer(i, "~w~Event ~g~Started", 5000, 3);
						DmEventCountDown = 60;
						AtriDM = 2;
						KillTimer(Event1SecT);
					}
				}
			}
		}
	}
	return 1;
}
Thing here is, it doesn't unfreeze players.
Reply


Messages In This Thread
Another Problem - by Uvais - 15.12.2017, 08:08
Re: Another Problem - by Logic_ - 15.12.2017, 08:17
Re: Another Problem - by RogueDrifter - 15.12.2017, 08:20
Re: Another Problem - by Uvais - 15.12.2017, 08:23
Re: Another Problem - by Logic_ - 15.12.2017, 08:25
Re: Another Problem - by Uvais - 15.12.2017, 08:25
Re: Another Problem - by RogueDrifter - 15.12.2017, 08:25
Re: Another Problem - by Uvais - 15.12.2017, 08:29
Re: Another Problem - by Logic_ - 15.12.2017, 08:31
Re: Another Problem - by Uvais - 15.12.2017, 08:34

Forum Jump:


Users browsing this thread: 1 Guest(s)