[UNSOLVED] TextDraw Countdown
#5

Ok...
In top of you script

pawn Код:
new PlantTimer;
new Second=30;
...and...
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerTeam(playerid) == TEAM_HOODIES)
    {
      new string[256], playername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "%s is stealing money. It takes to take 10 seconds.", playername);
        TextDrawSetString(text3, string);
        TextDrawHideForAll(text4);
        TextDrawShowForAll(text3);
        SetTimer("Destroy3", 2000, false);
        man[playerid] = 1;
        PlantTimer = SetTimer("Planted", 10000, false);
    }
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    if(GetPlayerTeam(playerid) == TEAM_HOODIES)
    {
      new string[256], playername[MAX_PLAYER_NAME];
      GetPlayerName(playerid, playername, sizeof(playername));
      format(string, sizeof(string), "%s has quit stealing money.", playername);
      KillTimer(PlantTimer);
        TextDrawSetString(text4, string);
        TextDrawHideForAll(text3);
        TextDrawShowForAll(text4);
        SetTimer("Destroy4", 2000, false);
        man[playerid] = 0;
        Second=30;
    }
    return 1;
}

forward Planted();
public Planted()
{
  Second--;
  if(Second < 1)
  {
    KillTimer(PlantTimer);
      format(string, sizeof(string), "Money was succesfully delivered.", timedeliver);
        TextDrawSetString(text19, string);
        TextDrawShowForAll(text19);
        SetTimer("AttackWin", 2000, false);
    }
    else
    {
        new string[256];
        format(string, sizeof(string), "%i seconds until money is delivered.", timedeliver);
        TextDrawSetString(text19, string);
        TextDrawShowForAll(text19);
    }
}
i not tested..
Reply


Messages In This Thread
[UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 18:52
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:03
Re: [UNSOLVED] TextDraw Countdown - by ReVo_ - 24.06.2010, 19:08
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:09
Re: [UNSOLVED] TextDraw Countdown - by ReVo_ - 24.06.2010, 19:15
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:22

Forum Jump:


Users browsing this thread: 2 Guest(s)