Timers
#3

I'll try to explain from what I believe you ask for.

pawn Code:
new timer = SetTimerEx("KickInactivePlayers",1000*60*10,true,playerid);

forward KickInactivePlayers(playerid);
public KickInactivePlayers(playerid)
{
     if(!IsPlayerActive(playerid)) Kick(playerid);
     return 1;
}
Where "1000*60*10" is actually:
Code:
1000 milliseconds * 60 (= 1 minute) * 10 (= 10 minutes)
Anytime you need to cancel this timer, just use:

pawn Code:
KillTimer(timer);
And ofcourse you'd have to state a function for:
pawn Code:
IsPlayerActive(playerid)
Hope it helps!
Reply


Messages In This Thread
Timers - by Mr.Valdez - 24.06.2013, 10:51
Re: Timers - by dEcooR - 24.06.2013, 10:56
Re: Timers - by introzen - 24.06.2013, 11:06
Re: Timers - by Mr.Valdez - 24.06.2013, 11:13
Re: Timers - by introzen - 24.06.2013, 11:36

Forum Jump:


Users browsing this thread: 2 Guest(s)