Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Include] lagcomp.inc - Fixed lagcomp response

$
0
0
lagcomp.inc
Updated: 25 April,2017 (in beta)

A simple include to fix SAMP lagcomp response and detection. This include simply sets all player team to same and make use of "OnPlayerGiveDamage" to handle damage registration and so we are using custom damage values, there is no way hackers could abuse the damage amount value. Also this also has protection against fake kills.

Testing
Lagcomp fix can be easily tested with a friend on your server, use this include in your script, join ingame, get a baseball bat and hit a player while runing. You'll notice the player you hit gets damage rightaway where you hit.

Functions
The include has 2 sweet functions to adjust player weapon damage (Note: this only deals with weapons effective under OnPlayerGiveDamage):
PHP Code:

SetPlayerWeaponDamage(playeridweaponidFloat:damage);
// http://wiki.sa-mp.com/wiki/Weapons

Float:GetPlayerWeaponDamage(playeridweaponid); 


Download
https://github.com/Agneese-Saini/SA-...de/lagcomp.inc

Credits
Slice - "ProcessDamage" function with the damage data array

Viewing all articles
Browse latest Browse all 18226

Trending Articles