L_Lag - Causes player to lag, ping fluctuations and more. -
Lordzy - 22.12.2015
L_Lag
Version - 1.0
Introduction
This include allows to get a player to lag by slowing down their connections with the server, which can result in increase over packet-loss and causes ping fluctuations. When a player's lag state is set to true, the player will lag just like how they normally lag because of bad network condition. This include contains only two functions -
pawn Код:
native TogglePlayerLag(playerid, bool:lag_state, lag_delay = 3000);
//playerid - Player on which lag_state should be toggled.
//lag_state - 0 to stop lag state, 1 to enable lagging.
//lag_delay - Lagging delay interval in milliseconds, it's set to 3000 by default.
//returns 1 if function is called successfully, 0 if fails.
native GetPlayerLagState(playerid);
//returns 1 if lagging, returns 0 if not lagging.
native ReconnectPlayer(playerid);
//Causes player to reconnect. This function doesn't return any value.
Changelogs
V - 1.1
- Uses function BlockIpAddress for SA-MP versions 0.3z R2-2 and above.
- Adds new optional function : ReconnectPlayer
V - 1.0
- Initial release.
Download
GitHub -
https://github.com/Lordzy/L_Lag
Raw Source -
https://raw.githubusercontent.com/Lo...lude/L_Lag.inc
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Ritzy2K - 22.12.2015
Why will someone make their player lag intentionally? This can be one form of punishment lol.
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Pottus - 22.12.2015
I consider this a joke script there is little use beyond being an asshole to use this but at least it is originally goofy.
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
IllidanS4 - 22.12.2015
Wouldn't it be better to use BlockIpAddress?
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Lordzy - 25.12.2015
I don't really see a use of it either but this can be used by anyone if they want any player to lag on purpose. Even for testing purposes, it can be used.
Quote:
Originally Posted by sprtik
Wouldn't it be better to use BlockIpAddress?
|
I haven't tried using BlockIpAddress function. I feel it's better to use SendRconCommand since it'll be compatible for every SA-MP versions.
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
IllidanS4 - 25.12.2015
Yeah, but in case the server crashed during the ban, the player would remain banned until manual unban. Nevertheless, you can use macros to check if BlockIpAddress and use it if so.
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Lordzy - 26.12.2015
Quote:
Originally Posted by sprtik
Yeah, but in case the server crashed during the ban, the player would remain banned until manual unban.
|
That's a good point. I never thought of it earlier but I'm going to release an update supporting both SendRconCommand and BlockIpAddress (Depends on the SA-MP version used).
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Lordzy - 02.01.2016
Include updated to v1.1!
Change Logs:
- Uses function BlockIpAddress for SA-MP versions 0.3z R2-2 and above.
- Adds new optional function : ReconnectPlayer
pawn Код:
native ReconnectPlayer(playerid);
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
SpikY_ - 02.01.2016
Good Update, Was just looking to make ReconnectPlayer for my server.
Re: L_Lag - Causes player to lag, ping fluctuations and more. -
Stanford - 02.01.2016
About the ReconnectPlayer function, won't this bug out sometimes? Like this might make players get the you are banned message or something? I remember I had something like this and this problem was an obstacle for the relogging feature!
I hope that this is fully functional your include is actually useful and good for testing things on laggy players!