[HELP] reamining time - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] reamining time (
/showthread.php?tid=487910)
[HELP] reamining time -
Luca12 - 15.01.2014
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
Re: [HELP] reamining time -
SilentSoul - 15.01.2014
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
}