22.12.2015, 13:12
(
Последний раз редактировалось Lordzy; 02.01.2016 в 12:54.
)
L_Lag
Version - 1.0
IntroductionVersion - 1.0
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.
V - 1.1
- Uses function BlockIpAddress for SA-MP versions 0.3z R2-2 and above.V - 1.0
- Adds new optional function : ReconnectPlayer
- Initial release.Download
GitHub - https://github.com/Lordzy/L_Lag
Raw Source - https://raw.githubusercontent.com/Lo...lude/L_Lag.inc