First timer not running?
#1

This is my ongamemodeinit:

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Team DM");
    SetTeamCount(2);
    AddPlayerClass(287, 887.95794678,-2409.54443359,23.77285576, 180, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(272, 887.95794678,-2409.54443359,23.77285576, 180, 0, 0, 0, 0, 0, 0);
    Map = 0;
    SendRconCommand("mapname Round End");
    LoadLostMap();
    SetNameTagDrawDistance(8.0);
    CreateVehicle(520, 0.0, 0.0, 0.0, 0.0, 0, 0, 1);
    SetTimer("MatchCron",1000,1);
    SetTimer("servercron",5090,1);
    mysql_init();
    mysql_connect(MYSQLHOST, MYSQLUSER, MYSQLKEY, MYSQLDB);
    CheckMySQLConnection();
    return 1;
}
The first timer NEVER runs, only the second, I can even switch their positions, the first one will never run.

I am clueless on how to fix this, can anyone help me out?
Reply
#2

Post the "MatchCron" callback, something is probably stopping it from running. You could also add debug lines at the start of the callback and at the end. Also add debug lines under OGMI.
Reply
#3

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
Post the "MatchCron" callback, something is probably stopping it from running.
If I put servercron on top, servercron wont run, and matchcron will.

It's nothing to do with the callbacks themselves
Reply
#4

What is LoadLostMap();
Reply
#5

Quote:
Originally Posted by Kar
Посмотреть сообщение
What is LoadLostMap();
It just creates objects.
Reply
#6

Post "MatchCron" and "servercron" code?
Reply
#7

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Post "MatchCron" and "servercron" code?
It has nothing to do with them, I just added a fake timer to the front, and the two both work perfectly. But I need them to work without a fake timer infront of them both.
Reply
#8

Are you sure you have spelled it right? Isn't it suppose to be "MatchRcon" and not "MatchCron"?
Reply
#9

pawn Код:
public OnGameModeInit()
{
    SetTimer("MatchCron",1000,1);
    SetTimer("servercron",5090,1);
    SetGameModeText("Team DM");
    SetTeamCount(2);
    AddPlayerClass(287, 887.95794678,-2409.54443359,23.77285576, 180, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(272, 887.95794678,-2409.54443359,23.77285576, 180, 0, 0, 0, 0, 0, 0);
    Map = 0;
    SendRconCommand("mapname Round End");
    LoadLostMap();
    SetNameTagDrawDistance(8.0);
    CreateVehicle(520, 0.0, 0.0, 0.0, 0.0, 0, 0, 1);
    mysql_init();
    mysql_connect(MYSQLHOST, MYSQLUSER, MYSQLKEY, MYSQLDB);
    CheckMySQLConnection();
    return 1;
}
try that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)