SetTimer's not working
#9

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Well, I'm having a weird problem.
My SetTimer isn't working at all. I've never had a problem with this before. I've been using Timers for a long time.

Here's the codes I am using to set timers:

pawn Код:
//OnGameModeInit
TheGame();
//
public TheGame()
{
    print("Going to EndGame"); // Yes it will print
    SetTimer("EndGame", 15000, false); // <- Doesn't work
    return 1;
}
//
public EndGame()
{
    SendClientMessageToAll(-1, "ended");
    SetTimer("ShowScores", 5000, false); // Nope.
    SetTimer("EndGame", 85000, false); // Nope.
    return 1;
}

public ShowScores(playerid)
{
    SetTimerEx("EndScores", 30000, false, "i", playerid); // Nope.
    SetTimerEx("SkipAbility", 15000, false, "i", playerid); // Nope.
    return 1;
}

public SkipAbility(playerid)
{
    SkipAbb[playerid] = 1;
    TextDrawShowForPlayer(playerid, PressKey);
    Seconds = 50;
    TheTimer = SetTimer("Countdown", 1000, true); // Nope.
    return 1;
}

public CountDown()
{
    print("The timer()");
    new string[15];
    if(Seconds == 0 && Minutes == 0)
    {
        KillTimer(TheTimer);
        TextDrawSetString(TimeDraw[1], "N/A");
        return 1;
    }
    Seconds--;
    return 1;
}
I don't get it why they're not working.
EDIT: TRY THIS

pawn Код:
//OnGameModeInit
TheGame();
//
public TheGame()
{
    print("Going to EndGame"); // Yes it will print
    SetTimer("EndGame", 15000, false); // <- Doesn't work
    return 1;
}
//
public EndGame()
{
    SendClientMessageToAll(-1, "ended");
        for(new i=0;i<MAX_PLAYERS;i++)
        {
        SetTimerEx("ShowScores", 5000, false, "i", i); // Nope.
        SetTimerEx("EndGame", 85000, false, "i", i); // Nope.
        }
    return 1;
}

public ShowScores(playerid)
{
    SetTimerEx("EndScores", 30000, false, "i", playerid); // Nope.
    SetTimerEx("SkipAbility", 15000, false, "i", playerid); // Nope.
    return 1;
}

public SkipAbility(playerid)
{
    SkipAbb[playerid] = 1;
    TextDrawShowForPlayer(playerid, PressKey);
    Seconds = 50;
    TheTimer = SetTimer("Countdown", 1000, true); // Nope.
    return 1;
}

public CountDown()
{
    print("The timer()");
    new string[15];
    if(Seconds == 0 && Minutes == 0)
    {
        KillTimer(TheTimer);
        TextDrawSetString(TimeDraw[1], "N/A");
        return 1;
    }
    Seconds--;
    return 1;
}
Reply


Messages In This Thread
SetTimer's not working - by Biesmen - 17.05.2011, 07:59
Re: SetTimer's not working - by Elka_Blazer - 17.05.2011, 08:44
Re: SetTimer's not working - by Biesmen - 17.05.2011, 09:35
Re: SetTimer's not working - by Elka_Blazer - 17.05.2011, 09:37
Re: SetTimer's not working - by Biesmen - 17.05.2011, 10:01
Re: SetTimer's not working - by Biesmen - 17.05.2011, 14:32
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 14:39
Re: SetTimer's not working - by Biesmen - 17.05.2011, 14:39
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 14:50
Re: SetTimer's not working - by Biesmen - 17.05.2011, 14:50
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 14:57
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 15:16
Re: SetTimer's not working - by Biesmen - 17.05.2011, 15:17
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 15:21
Re: SetTimer's not working - by Biesmen - 17.05.2011, 15:28
Re: SetTimer's not working - by playbox12 - 17.05.2011, 15:29
Re: SetTimer's not working - by Sasino97 - 17.05.2011, 15:37
Re: SetTimer's not working - by Biesmen - 17.05.2011, 16:17
Re: SetTimer's not working - by playbox12 - 17.05.2011, 16:50
Re: SetTimer's not working - by Biesmen - 17.05.2011, 16:57

Forum Jump:


Users browsing this thread: 2 Guest(s)