this pausecheck is good? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: this pausecheck is good? (
/showthread.php?tid=177416)
this pausecheck is good? -
Ribber - 17.09.2010
I have a pause check that people don't abuse zone capturing.
pawn Код:
public OnPlayerUpdate(playerid)
{
SetPVarInt(playerid,"LastUpdate",GetTickCount());
return 1;
}
forward KickAFKCapturing();
public KickAFKCapturing()
{
foreach(Player,i)
{
if(PlayerIsCapture[i] == 1)
{
if(CheckPausing(i) == 1)
{
SendLangMessageToAll(_COLOR_RED,"AFK","AFK");
}
}
}
}
stock CheckPausing(playerid)
{
if(GetTickCount() > ( GetPVarInt(playerid,"LastUpdate") + 300 ))
{
return 1;
}
return 0;
}
Tested and worked.
now my question: Will that be bugg for high ping players with the 300 int?
To say is that it could be abused with a higher int (example 1000).
Re: this pausecheck is good? -
woot - 17.09.2010
300 is quite low. I'm using 2000 atm and it still sometimes bugs.
AW: this pausecheck is good? -
Ribber - 18.09.2010
that is shit.
Is there another better pause function which work on laggers and with maybe 500 ms in pause.