19.04.2013, 11:17
(
Последний раз редактировалось RedFusion; 19.04.2013 в 12:16.
)
Using a system like this on my server, tweaked it quite a bit so it works flawlessly now.
I found an anti-autoaim script before, i think i have it saved somewhere.
I have a few tips for people that i had to figure out myself..
These weapons/methods doesn't work with OnPlayerGiveDamage, but they do however work with OnPlayerTakeDamage:
Use variables for storing health and armour, because if you use GetPlayerHealth and GetPlayerArmour together with rapid fire weapons things tend to get delayed and wierd.
Use your own function and call it within OnPlayerGiveDamage and OnPlayerTakeDamage, under some circumstances explained above.
Also use OnPlayerTakeDamage + if the issuerid isn't connected, as a way to keep track on damage, and saving the new values to your eventual health variables.
Drown and fall damage takes health damage even if you have armour.
Check within the function you made for synced damage; if the player's health/armour - amount equals death.
If it does, save the reason and killerid into a variable, which can be read within OnPlayerDeath
I found an anti-autoaim script before, i think i have it saved somewhere.
I have a few tips for people that i had to figure out myself..
These weapons/methods doesn't work with OnPlayerGiveDamage, but they do however work with OnPlayerTakeDamage:
- Explosives
- Heli Blades
- Vehicle Ramming
- Driveby aim-assist
Use variables for storing health and armour, because if you use GetPlayerHealth and GetPlayerArmour together with rapid fire weapons things tend to get delayed and wierd.
Use your own function and call it within OnPlayerGiveDamage and OnPlayerTakeDamage, under some circumstances explained above.
Also use OnPlayerTakeDamage + if the issuerid isn't connected, as a way to keep track on damage, and saving the new values to your eventual health variables.
Drown and fall damage takes health damage even if you have armour.
Check within the function you made for synced damage; if the player's health/armour - amount equals death.
If it does, save the reason and killerid into a variable, which can be read within OnPlayerDeath