Frozen team fails?
#1

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
Reply
#2

Hump da BUMP
Reply
#3

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
  }
}
Reply
#4

Код:
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)