this pausecheck is good?
#1

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).
Reply
#2

300 is quite low. I'm using 2000 atm and it still sometimes bugs.
Reply
#3

that is shit.
Is there another better pause function which work on laggers and with maybe 500 ms in pause.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)