[HELP] Countdown
#1

Hello people,

I'm trying to make a timer but I keep getting the same error IG. It all complies well but I only see the textdraw for 3 seconds (3000) and then it's gone. But I want that it goes just like the prison timer that it counts down to zero. I've done exactly the same thing that the prison countdown system is using but it ain't working.

Код:
               case 2222:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        SendClientMessage(playerid, WHITE, "You've started smuggling materials with the help of a visitor.");
                          new string[128];
                        format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~ ~R~%d seconds (%d minutes)", 600, SecondsToMinutes(600));
                        GameTextForPlayer(playerid, string, 3000, 3);
                        Player[playerid][InabilityToMatrun] = 1;
                        TogglePlayerControllable(playerid, false);
                    }
                    case 1:
                    {
                        SendClientMessage(playerid, WHITE, "You've started smuggling cocaine with the help of a visitor.");
                          new string[128];
                        format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~ ~R~%d seconds (%d minutes)", 600, SecondsToMinutes(600));
                        GameTextForPlayer(playerid, string, 3000, 3);
                        Player[playerid][InabilityToMatrun] = 1;
                        TogglePlayerControllable(playerid, false);
                    }
                    case 2:
                    {
                        SendClientMessage(playerid, WHITE, "You've started smuggling materials with the help of a visitor.");
                          new string[128];
                        format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~ ~R~%d seconds (%d minutes)", 600, SecondsToMinutes(600));
                        GameTextForPlayer(playerid, string, 1000, 3);
                        Player[playerid][InabilityToMatrun] = 1;
                        TogglePlayerControllable(playerid, false);
                    }
                }
            }
That's the one that's not working.


And this one is working and counting down to zero;
Код:
                if(Player[i][PrisonDuration] >= 1)
                {
                    new string[128];
                    Player[i][PrisonDuration]--;
                    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~ ~R~%d seconds (%d minutes)", Player[i][PrisonDuration], SecondsToMinutes(Player[i][PrisonDuration]));
                       GameTextForPlayer(i, string, 1000, 3);
                }
Can anyone help me out with this? I'm missing something?
Reply
#2

bumpp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)