Check limit login
#1

how to check if the player isnt logged in after 30 seconds.. and kick, with no timers.. is possible ?
Reply
#2

No that is not possible without timers,because the timer would make it react after 30 sec.
Reply
#3

OF topic: im asking.. how is it with timer?
Reply
#4

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
Reply
#5

no possible, with gettickcount or gettime ?
Reply
#6

Quote:
Originally Posted by doreto
Посмотреть сообщение
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
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;
}
Reply
#7

?
Reply
#8

so ?
Reply
#9

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.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)