19.02.2015, 06:27
Well, did you do the following somewhere in your code:
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:
and the timer
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:
forward GMX();
pawn Code:
forward GMXTest();
public GMXTest()
pawn Code:
SetTimer("GMXTest", 10000, true);
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;
}