Alt-tab Detection - 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: Alt-tab Detection (
/showthread.php?tid=398936)
Alt-tab Detection -
PRoleplay - 12.12.2012
Can anyone help me for alt tabbed detection?
i got afk detection my problem is alt tab detection
thanks in advance
Re: Alt-tab Detection -
Scenario - 12.12.2012
Same thing.
Re: Alt-tab Detection -
XtremeR - 12.12.2012
use this:
https://sampforum.blast.hk/showthread.php?tid=281590
Re: Alt-tab Detection -
BrandyPenguin - 12.12.2012
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)?
Re: Alt-tab Detection -
PRoleplay - 12.12.2012
Quote:
Originally Posted by XtremeR
|
thanks man i will try this
Re: Alt-tab Detection -
PRoleplay - 12.12.2012
@XtremeR
can you give me an idea how it works?
coz i dont know how thanks
Re: Alt-tab Detection -
XtremeR - 12.12.2012
its simple example:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerAltTabbing(playerid))
{
SendClientMessage(playerid,-1,"You just alt tab, and kicked!");
Kick(playerid);
}
return 1;
}
Re: Alt-tab Detection -
PRoleplay - 12.12.2012
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
Re: Alt-tab Detection -
PRoleplay - 12.12.2012
not working
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerAltTabbing[playerid] > 0)
{
playerTabbed[playerid] = 1;
playerTabTime[playerid] += 1;
}
else
{
playerTab[playerid] = 0;
playerTabTime[playerid] = 0;
}
return 1;
}