Check limit login - 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: Check limit login (
/showthread.php?tid=369019)
Check limit login -
NewbieScripter - 15.08.2012
how to check if the player isnt logged in after 30 seconds.. and kick, with no timers.. is possible ?
Re: Check limit login -
TaLhA XIV - 15.08.2012
No that is not possible without timers,because the timer would make it react after 30 sec.
Re: Check limit login -
Akcent_Voltaj - 15.08.2012
OF topic: im asking.. how is it with timer?
Re: Check limit login -
doreto - 15.08.2012
https://sampwiki.blast.hk/wiki/SetTimerEx
make varible to check is login/register and if not after 39 sec is not login/register to kick him
Re: Check limit login -
NewbieScripter - 15.08.2012
no possible, with gettickcount or gettime ?
Re: Check limit login -
NewbieScripter - 15.08.2012
Quote:
Originally Posted by doreto
|
so, this is the correct way ?
OnPlayerConnect:
pawn Код:
SetTimerEx("@Example", 30000, false, "i", playerid);
pawn Код:
forward @Example(playerid);
@Example(playerid)
{
if(Info[playerid][Status] != 1) return Kick(playerid);
return 1;
}
Re: Check limit login -
NewbieScripter - 15.08.2012
?
Re: Check limit login -
NewbieScripter - 15.08.2012
so
?
Re: Check limit login -
playbox12 - 15.08.2012
Yeah, that would work, function should be public though. But yes you could do it with gettime and on player update, I just don't see why. It's like some people have grown a phobia against using timers (probably due to godfather) however when used properly they're not bad at all.
Re: Check limit login -
NewbieScripter - 15.08.2012
Quote:
Originally Posted by playbox12
Yeah, that would work, function should be public though. But yes you could do it with gettime and on player update, I just don't see why. It's like some people have grown a phobia against using timers (probably due to godfather) however when used properly they're not bad at all.
|
more timer with intervals of a few milliseconds would cause lag... and that's why I do not want to use many timers