Timer Doesn't work.
#1

Whats wrong with that ??

pawn Код:
forward StartFire(playerid);

new Float:RandomSpawn[][3] =
{
    // Positions, (X, Y, Z)
    {-2796.9854, 1224.8180, 20.5429},
    {-2454.2170, 503.8759, 30.0790},
    {-2669.7322, -6.0874, 6.1328}
};

SetTimer("StartFire", 120000, 1); //2 min

public StartFire(playerid)
{
            new rand = random(sizeof(RandomSpawn));
            SetPlayerCheckpoint(playerid,RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2], 3.0);
            CreateObject(18689,RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2], 0.0, 0.0, 0.0, 50000.0);
            SendClientMessageToAll(COLOR_WHITE, "A BIG FIRE HAS STARTED !");
      return 1;
}
Tnx guys
Reply
#2

what are the errors or warnings?
Reply
#3

SetTimer("StartFire", 120000, 1); //2 min is supposed to be under OnGameModeInit

Код:
public OnGameModeInit()
{
SetTimer("StartFire", 120000, 1); //2 min is supposed to be under OnGameModeInit

return 1;
}
Reply
#4

Quote:
Originally Posted by dominik523
Посмотреть сообщение
what are the errors or warnings?
There are not warnings or errors.
Quote:
Originally Posted by andruz99
Посмотреть сообщение
SetTimer("StartFire", 120000, 1); //2 min is supposed to be under OnGameModeInit

Код:
public OnGameModeInit()
{
SetTimer("StartFire", 120000, 1); //2 min is supposed to be under OnGameModeInit

return 1;
}
Thats what I did.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)