checkidle()
hello, could someone help me with this problem that I have, I am using the checkidle command but, my problem is that I keep counting the tic even when you are dead, which keeps me counting the time to be AFK and throw them away even if they are dead Are there Any way that the command validates, if it is dead and stops counting, and when reviving the count is reset?
Question
Eyhra
checkidle()
hello, could someone help me with this problem that I have, I am using the checkidle command but, my problem is that I keep counting the tic even when you are dead, which keeps me counting the time to be AFK and throw them away even if they are dead Are there Any way that the command validates, if it is dead and stops counting, and when reviving the count is reset?
BUILDIN_FUNC(checkidle) { TBL_PC *sd = NULL; if (script_hasdata(st, 2)) sd = map_nick2sd(script_getstr(st, 2)); else sd = script_rid2sd(st); if (sd) script_pushint(st, DIFF_TICK(last_tick, sd->idletime)); else script_pushint(st, 0); return 0; }
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.