Alt-tab Detection
#1

Can anyone help me for alt tabbed detection?
i got afk detection my problem is alt tab detection
thanks in advance
Reply
#2

Same thing.
Reply
#3

use this: https://sampforum.blast.hk/showthread.php?tid=281590
Reply
#4

If i remember correctly someone tell me once that server won't call OnPlayerUpdate when user is alt-tabbed out.
Maybe some check with timestamp (set on OnPlayerUpdate)?
Reply
#5

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
thanks man i will try this
Reply
#6

@XtremeR
can you give me an idea how it works?
coz i dont know how thanks
Reply
#7

its simple example:

pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerAltTabbing(playerid))
{
SendClientMessage(playerid,-1,"You just alt tab, and kicked!");
Kick(playerid);
}
return 1;
}
Reply
#8

can you help me i want to create a command /paused to list all alttab

anyways thanks for helping me ill give +rep to you
Reply
#9

not working
Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerAltTabbing[playerid] > 0)
	{
		playerTabbed[playerid] = 1;
		playerTabTime[playerid] += 1;
	}
	else
	{
	    playerTab[playerid] = 0;
		playerTabTime[playerid] = 0;
	}
	
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)