wilber32

  • Jr. Member
  • Posts: 56
Anti-Lag
« on December 20th, 2015, 05:28 PM »Last edited on December 20th, 2015, 05:36 PM
hi, friends today will show you an antilag to clear to everyone who sees porn as they play. :V

Code: [Select]
function onPlayerSpawn()
{
if (player.Ping >= the amount you want  )
{
Message("Auto-Kicked:[ " + player.Name + " ] Reason:[ Execeeded ping 750ms ]");
player.Kick();
}
}

Credits: [ZG]Luis, Wilber32

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,807
Re: Anti-Ping
« Reply #1, on December 20th, 2015, 05:33 PM »Last edited on December 20th, 2015, 05:42 PM
This is called Anti-Lag you nabs. And comes back from older days like CS 1.6. And I doubt you can watch porn and play the game if you have that lag in the first place.

And I could pause the porn right before I spawn to get past your dumb protection. This is generally achieved with a timer and an average calculation of the client ping to avoid kicking the player for a short spike in latency.

-1, Now go back to your room.
.

hotdogcat

  • Jr. Member
  • Posts: 79
Re: Anti-Lag
« Reply #2, on December 20th, 2015, 10:18 PM »
Quote from wilber32 on December 20th, 2015, 05:35 PM
Quote from S.L.C on December 20th, 2015, 05:33 PM
This is called Anti-Lag you nabs. And comes back from older days like CS 1.6. And I doubt you can watch porn and play the game if you have that lag in the first place.
His English is bad

another Anti-Lag
Code: [Select]
function onScriptLoad()
{
NewTimer( "AntiPing", 1000, 0 );
}

Functions
 //Anti Lag
if (player.Ping >= 750 )
{
Message("Auto-Kicked:[ " + player.Name + " ] Reason:[ Execeeded ping 750ms  ]");
player.Kick();
}
}
How do you except this to works? i think you haven't even tested it


Credits to Bart.

wilber32

  • Jr. Member
  • Posts: 56
Re: Anti-Lag
« Reply #3, on December 20th, 2015, 10:53 PM »
Code: [Select]
function onScriptLoad()
{
NewTimer( "AntiPing", 1000, 0 );
}

function AntiPing()
{
for (local i=0; i<GetMaxPlayers(); i++)
{
local player=FindPlayer(i);
if(player)
{
if (player.Ping >= 750 )
{
Message("Auto-Kicked:[ " + player.Name + " ] Reason:[ Execeeded ping 750ms ]");
player.Kick();
}
}
}
}

KAKAN

  • Wiki Contributor
  • Posts: 3,343
Re: Anti-Lag
« Reply #4, on December 21st, 2015, 08:42 AM »Last edited on December 21st, 2015, 04:16 PM
lel, why would run the timer for that?
A player will lag, let him lag, just check when he spawns,  but this was not needed actually.
Here's a simple and better one.
Code: [Select]
const PingLimit = 600; //This is the ping limit, if the player's ping goes over tthis limt, he'll be kicked.
function onPlayerRequestSpawn( player ){
if( player.Ping >= PingLimit ){
local szMsg = format("Your ping is more than the average ping( %d ). So you can't spawn and you'll be kicked now",PingLimit);
PrivMessage(player,szMsg);
szMsg = format("Auto-Kicked: [ %s ]. Reason: [ Ping limit exceeded - ping limit is %d ]",player.Name.tostring(),PingLimit);
Message(szMsg);
player.Kick();
}
else return 1;
}
}
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

wilber32

  • Jr. Member
  • Posts: 56
Re: Anti-Lag
« Reply #5, on December 21st, 2015, 04:04 PM »
Hahaha kakán good system: P