Timer is not working
#4

Well, did you do the following somewhere in your code:

pawn Code:
forward GMX();
I am actually pretty sure it gives an error if you don't so I feel pretty dumb for even asking, but I've re-read that code several times and I don't see any issues. Have you tried renaming GMX? Try the following:

pawn Code:
forward GMXTest();
public GMXTest()
and the timer

pawn Code:
SetTimer("GMXTest", 10000, true);
Also for best practice purposes it might be a good idea to store the timers and kill them, but I am pretty sure it does that on its own once the gamemode dies. But yeah, the idea is that maybe the name is conflicting?

EDIT:

Here is a better indented version of GMX for the next readers:

pawn Code:
public GMX()
{
    print("Hello World!");
    SetTimer("GMX2", 10000, false);
    TextDrawDestroy(Watch);
    if(T1Kills > T2Kills)
    {
        for(new i=0;i<MAX_PLAYERS;i++)
    {
            if(gTeam[i] == T1)
        {
            GameTextForPlayer(i, "You Won! When is the party?", 4000, 3);
            SetPlayerScore(i, GetPlayerScore(i) + 1);
        GivePlayerMoney(i, 2000);
            }
        else
        {
        GameTextForPlayer(i, "You brought Disgrace!You LOST!", 4000, 3);
        }
    }
    }
    else if(T2Kills > T1Kills)
    {
    for(new i=0;i<MAX_PLAYERS;i++)
        {
        if(gTeam[i] == T2)
            {
        GameTextForPlayer(i, "You Won! When is the party?", 4000, 3);
                SetPlayerScore(i, GetPlayerScore(i) + 1);
                GivePlayerMoney(i, 2000);
            }
            else
            {
        GameTextForPlayer(i, "You brought Disgrace!You LOST!", 4000, 3);
            }
        }
    }
    else if(T1Kills == T2Kills)
    {
    GameTextForAll("Round Draw!", 4000, 3);
    }
    return 1;
}
Reply


Messages In This Thread
Timer is not working - by Dex007HLH - 19.02.2015, 06:00
Re: Timer is not working - by Extremo - 19.02.2015, 06:20
Re: Timer is not working - by Dex007HLH - 19.02.2015, 06:23
Re: Timer is not working - by Extremo - 19.02.2015, 06:27
Re: Timer is not working - by Vince - 19.02.2015, 06:45
Re: Timer is not working - by Extremo - 19.02.2015, 06:58
Re: Timer is not working - by Dex007HLH - 19.02.2015, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)