SA-MP Forums Archive
Frozen team fails? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Frozen team fails? (/showthread.php?tid=123268)



Frozen team fails? - -Rebel Son- - 25.01.2010

Ok, i want help making a Function or command that wins a player dies, they are frozen, and when a hole team is frozen the oposite team wins, Any ideas on how to make this



Re: Frozen team fails? - -Rebel Son- - 25.01.2010

Hump da BUMP


Re: Frozen team fails? - mansonh - 25.01.2010

First off read the rules section:
http://forum.sa-mp.com/index.php?topic=67900.0
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old.


pawn Код:
new bool:playerFrozen[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
  TogglePlayerControl(playerid, false);
  playerFrozen[playerid] = true;
}

forward TeamFreezeTimer();
public TeamFreezeTimer()
{
  new bool:t1Frozen=true, bool:t2Frozen=true;
  for(new playerid=0; playerid < GetMaxPlayers() && (t1Frozen || t2Frozen); playerid++)
  {
    if(playerFrozen[playerid]) continue;
    if(/*your player team system team 1*/) t1Frozen=false;
    if(/*your player team system team 2*/) t2Frozen=false;
  }
  if(t1Frozen)
  {
    //Whatever you want to do at the end of the round
  }else if(t2Frozen)
  {
    //Whatever you want to do at the end of the round
  }
}



Re: Frozen team fails? - -Rebel Son- - 25.01.2010

Код:
forward TeamFreezeTimer();
public TeamFreezeTimer()
{
  new bool:t1Frozen=true, bool:t2Frozen=true;
  for(new playerid=0; playerid < GetMaxPlayers() && (t1Frozen || t2Frozen); playerid++)
  {
    if(playerFrozen[playerid]) continue;
    if(gTeam[playerid] == 1) t1Frozen=false;
    if(gTeam[playerid] == 2) t2Frozen=true;
  }
  if(t1Frozen)
  {
  GameTextForAll("|PRISONERS ~r~WIN|", 5000, 5);
  GameModeExit();
  }else if(t2Frozen)
  {
  GameTextForAll("|GUARDS ~r~WIN|", 5000, 5);
  GameModeExit();
  }
}
it doesnt work, when i team dies, it doesnt freeze them or do the gmx :S?