Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) { if (weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES) // Disable helikill and carpark return false; new avg_rate = AverageShootRate(issuerid, 2); // Lower rapid fire damage if (avg_rate != -1) { if (weapon == WEAPON_DEAGLE && avg_rate < 500) { amount /= 1.4; } else if (weapon == WEAPON_SHOTGSPA && avg_rate < 250) { amount /= 1.4; } } // Silencer headshot if (weapon == WEAPON_SILENCED && bodypart == 9) { amount = 30.0; } // Rifle headshot if (weapon == WEAPON_RIFLE && bodypart == 9) { amount /= 0.75; } // Sniper headshot if (weapon == WEAPON_SNIPER && bodypart == 9) { if (amount == 30.0) { amount = 40.0; } else if (amount == 35.0) { amount = 40.0; } else if (amount == 45.0) { amount = 50.0; } } return true; } |
[23:58:25] (wc:0) Requested class: 0 [23:58:25] (wc:0) True death class selection [23:58:32] (wc:0) vz: 0.000000 anim: 1132 prev: 1189 [23:58:32] (wc:0) vz: 0.000000 anim: 1133 prev: 1132 [23:58:41] (wc:0) vz: -0.104591 anim: 1130 prev: 1195 [23:58:42] (wc:0) OnPlayerTakeDamage(0 took 34.728229 from 65535 by 54 on bodypart 3) [23:58:42] (wc:0) vz: 0.000000 anim: 1208 prev: 1130 [23:58:42] (wc:0) fall dmg: 18.67585 (vz: -0.498813, anim: 1208, prev: 1130) [23:58:55] (wc:0) vz: -0.105296 anim: 1130 prev: 1195 [23:58:56] (wc:0) OnPlayerTakeDamage(0 took 39.880088 from 65535 by 54 on bodypart 3) [23:58:56] (wc:0) vz: 0.000000 anim: 1208 prev: 1130 [23:58:56] (wc:0) fall dmg: 21.54522 (vz: -0.544723, anim: 1208, prev: 1130) [23:59:06] (wc:0) vz: -0.102363 anim: 1130 prev: 1195 [23:59:07] (wc:0) OnPlayerTakeDamage(0 took 34.832263 from 65535 by 54 on bodypart 3) [23:59:07] (wc:0) vz: 0.000000 anim: 1208 prev: 1130 [23:59:07] (wc:0) fall dmg: 19.39770 (vz: -0.510363, anim: 1208, prev: 1130) [23:59:28] (wc:0) OnPlayerTakeDamage(0 took 82.500000 from 65535 by 51 on bodypart 3) [23:59:29] (wc:0) vz: -0.106083 anim: 1130 prev: 1189 [23:59:30] (wc:0) OnPlayerTakeDamage(0 took 38.225410 from 65535 by 54 on bodypart 3) [23:59:30] (wc:0) vz: 0.000000 anim: 1208 prev: 1130 [23:59:30] (wc:0) fall dmg: 20.57295 (vz: -0.529167, anim: 1208, prev: 1130) [23:59:34] (wc:0) OnPlayerTakeDamage(0 took 82.500000 from 65535 by 51 on bodypart 3) [23:59:36] (wc:0) OnPlayerTakeDamage(0 took 82.500000 from 65535 by 51 on bodypart 3) [23:59:38] (wc:0) OnPlayerTakeDamage(0 took 82.500000 from 65535 by 51 on bodypart 3) [23:59:38] (wc:0) vz: -0.146315 anim: 1133 prev: 1257 [23:59:39] (wc:0) OnPlayerTakeDamage(0 took 82.500000 from 65535 by 51 on bodypart 3) [23:59:40] (wc:0) vz: -0.140734 anim: 1133 prev: 1257 |
since the author apparently threw the development, I would like to continue it
I created a fork of the project and continue it you can download the updated version here https://github.com/f0Re3t/samp-weapon-config if you find any bug, please let me know here https://github.com/f0Re3t/samp-weapon-config/issues at this point I have quite enough fixes for this project |
I'm all for making forks when the original owner no longer maintains it, but did you make a pull request?
|
A year ago? https://github.com/oscar-broman/samp...005fbde1a1de35
That was March 7th, 2018. So not a year, not half a year, not even a quarter of a year, but merely a sixth of a year. Even so, why did you remove your fork? You had fixes that EVERYONE could've used and most definitely would've appreciated. You could've continued updating the repo with fixes and sending pull requests to the main repo for everyone to use. Also consider this PR https://github.com/oscar-broman/samp...config/pull/81 |
okay, maybe I'll think about getting fork and the fixs back.
about this PR - I fixed this crash in my version regarding the commit - it is accepted from PR, but not a personal update of the system by the author ![]() |
okay, maybe I'll think about getting fork and the fixs back.
about this PR - I fixed this crash in my version regarding the commit - it is accepted from PR, but not a personal update of the system by the author ![]() |
You could make pull requests as well and get things in the official repository. I happen to know that while slice isn't active here any more he does still pay attention.
And to those complaining about forks and someone else developing the code - this is released under the apache license, so he can. |
Why did you switch on the conditionals to floatcmp?
Ain't it does the same and actually faster without it? |