[HELP] reamining time
#1

Hello for example I activate some timer which is 30 minutes know I want but I don't know how to make when is for example 5 minutes remaining then it send meesage to player if you know what I mean? Thanks

5 minutes remaing
Reply
#2

Set timer 25 minutes and when the 25 minutes passes and the timer call back gets called SendClientMessage to him and notify him that there's 5 minutes left and activate another time within 5 minutes when it passes and the callback gets called do what ever you want. here's a fast example.
pawn Код:
//In where ever you'll use it
SetTimer("25Minutes",1500000,false); //1500000 = 25 minutes
//
forward 25Minutes(playerid);//calling the timer
public 25Minutes(playerid)
{
    SendClientMessage(playerid,-1,"5 Minutes remain");
    SetTimer("5Minutes",300000,false);
}
forward 5Minutes(playerid);//calling the timer
public 5Minutes(playerid)
{
    //do what you want here
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)