Freeze everyone.
#10

Код:
freezeTeam(team, bool:freeze = true, seconds_to_unfreeze = 5000) { // freeze = true, unfreeze = false

	for (new i = GetMaxPlayers()-1; i >= 0; i--) {
	
		if (GetPlayerTeam(i) == team) 
			TogglePlayerControllable(i, freeze);
	}
	
	if (freeze) SetTimerEx("_unfreezeTeam", seconds_to_unfreeze, false, "i", team);
}


forward _unfreezeTeam(team);
public _unfreezeTeam(team) {

	for (new i = GetMaxPlayers()-1; i >= 0; i--) {
	
		if (GetPlayerTeam(i) == team) 
			TogglePlayerControllable(i, false);
	}
	
	return 1;
}
Reply


Messages In This Thread
Freeze everyone. - by siemka321 - 27.12.2012, 10:12
Re: Freeze everyone. - by DaRk_RaiN - 27.12.2012, 10:23
Re: Freeze everyone. - by siemka321 - 27.12.2012, 10:44
Re: Freeze everyone. - by DaRk_RaiN - 27.12.2012, 10:48
Re: Freeze everyone. - by siemka321 - 27.12.2012, 10:52
Re: Freeze everyone. - by mineralo - 27.12.2012, 11:00
Re: Freeze everyone. - by siemka321 - 27.12.2012, 15:45
Re: Freeze everyone. - by mineralo - 27.12.2012, 16:45
Re: Freeze everyone. - by siemka321 - 27.12.2012, 17:16
Re: Freeze everyone. - by DXM - 27.12.2012, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)