[FilterScript] Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced)
#4

Hmmm, from my experience writing anti-lag systems this is not a good way to write it. It's actually better to make your own OnPlayerDeath() callback usually OnPlayerDeathEx() or whatever you want to call it then calculate damage through OnPlayerTakeDamage() and manually set health/armor there so you know when the player dies then make the call to OnPlayerDeathEx(). In this way OnPlayerGiveDamage() would actually call OnPlayerTakeDamage() to issue a hit you can also do some other stuff with this system such as removing the need to set all players to the same team so lead aim and anti-lag can be combined (requires waiting to see if OnPlayerTakeDamage() is called to prevent double hitting).

One more suggestion instead of doing this....

lasthit[playerid] = -1;

Do this to improve readability

lasthit[playerid] = INVALID_PLAYER_ID;
Reply


Messages In This Thread
Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Matz - 20.02.2013, 22:42
Respuesta: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Dex007HLH - 20.02.2013, 23:16
Re : Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Ultrascipter - 21.02.2013, 00:04
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Pottus - 21.02.2013, 01:18
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by PabloDiCostanzo - 21.02.2013, 01:59
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Kar - 21.02.2013, 02:06
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Pottus - 21.02.2013, 02:31
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by tandytanz - 21.02.2013, 04:44
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Edvin - 21.02.2013, 13:14
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by doreto - 21.02.2013, 13:32
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by QuaTTrO - 21.02.2013, 14:30
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Pottus - 21.02.2013, 15:54
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by doreto - 21.02.2013, 16:35
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by xDaidal0S - 22.02.2013, 15:48
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Matz - 23.02.2013, 14:17
Re : Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by luopifr - 02.01.2014, 20:09
Re : Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by med01 - 12.01.2014, 17:26
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Sting. - 23.01.2014, 13:04
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by CoaPsyFactor - 23.01.2014, 15:38
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Exhibit - 26.05.2018, 14:09
Re: Anti-Lag/Anti-Lead/MTA-Bullet Hit Sync System v0.1 (Weapon Damages Synced) - by Riddick94 - 26.05.2018, 15:37

Forum Jump:


Users browsing this thread: 2 Guest(s)