Re: weapon-config.inc - Damage system with many features -
playZeD - 27.09.2017
cool thing thanks a lot !
Re: weapon-config.inc - Damage system with many features -
ToySoldier - 28.09.2017
This is a great include.
Re: weapon-config.inc - Damage system with many features -
Skream - 07.10.2017
Is there any version fixing the y_hooks conflict?
Re: weapon-config.inc - Damage system with many features -
MBilal - 29.10.2017
How to delay the death of the player who got headshooted ?
I'm using the 2 sec Timer to set his health to 0 using SetPlayerHealth(playerid,0); but the problem is in deathlist it showing he got killed by no one like he did /kill .
I'm doing this right now. this was working fine with OnPlayerTakeDamage before but after changing it to OnPlayerDamage it's not working like it was.
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
SetPLayerHealth(playerid,0);
return 1;
}
Should i do this?
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid,Float:amount)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
amount = 0.0;
return 1;
}
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 29.10.2017
Quote:
Originally Posted by MBilal
How to delay the death of the player who got headshooted ?
I'm using the 2 sec Timer to set his health to 0 using SetPlayerHealth(playerid,0); but the problem is in deathlist it showing he got killed by no one like he did /kill .
I'm doing this right now. this was working fine with OnPlayerTakeDamage before but after changing it to OnPlayerDamage it's not working like it was.
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
SetPLayerHealth(playerid,0);
return 1;
}
Should i do this?
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid,Float:amount)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
amount = 0.0;
return 1;
}
|
You could try to do it with OnPlayerPrepareDeath or OnPlayerDeathFinished.
But I recommend you to view
https://github.com/oscar-broman/samp-weapon-config anyways.
Re: weapon-config.inc - Damage system with many features -
2Col - 09.12.2017
Should I include this before fixes.inc?
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 01.03.2018
Quote:
Originally Posted by Nubik
Why isn't OnPlayerGiveDamage and OnPlayerTakeDamage hooked while all other callbacks/functions are hooked?
I'm using BustAim and when I include weapon-config before BustAim it gives me this error:
Code:
symbol already defined: "OnPlayerGiveDamage"
Should I include BustAim before weapon-config?
|
I'm including BustAim before weapon-config and it works.
Re: weapon-config.inc - Damage system with many features -
hawk2012 - 02.03.2018
Where it is better to apply this piece, on RP servers or on DM? The fact that the RP can come in handy in some mini-games. And the system itself is very good and as an addition and as a separate component.
Re: weapon-config.inc - Damage system with many features -
waysemir - 16.03.2018
0.3DL please!
Re: weapon-config.inc - Damage system with many features -
Max_Andolini - 19.03.2018
Weapon Config my forked version 0.3.DL
https://github.com/MaxAndolini/samp-weapon-config
SKY Plugin 0.3.DL version
http://forum.sa-mp.com/showpost.php?...&postcount=137
Re: weapon-config.inc - Damage system with many features -
Kaperstone - 19.03.2018
Quote:
Originally Posted by Max_Andolini
|
What is the difference between this and the existing one except, as I see, only my pull request and lots of space added after for and if.
Quote:
Originally Posted by TaylorShade
I included weapon-config.inc and when i shoot someone he isn't losing health, also when he shoots me same problem.. i got this from crashdetect
Код:
[19:05:04] [debug] Run time error 11: "Divide by zero"
[19:05:04] [debug] AMX backtrace:
[19:05:04] [debug] #0 00000f78 in AverageShootRate (playerid=0, shots=1, &multiple_weapons=@00000000 0) at C:\Users\stefan\Desktop\Fusion Gaming NEW\Compiler\include\weapon-config.inc:981
[19:05:04] [debug] #1 00012b10 in public OnPlayerWeaponShot (playerid=0, weaponid=24, hittype=1, hitid=1, Float:fX=-0.19580, Float:fY=0.07214, Float:fZ=0.47790) at C:\Users\stefan\Desktop\Fusion Gaming NEW\Compiler\include\weapon-config.inc:3450
[19:05:06] [debug] Run time error 11: "Divide by zero"
[19:05:06] [debug] AMX backtrace:
[19:05:06] [debug] #0 00000f78 in AverageShootRate (playerid=0, shots=1, &multiple_weapons=@00000000 0) at C:\Users\stefan\Desktop\Fusion Gaming NEW\Compiler\include\weapon-config.inc:981
[19:05:06] [debug] #1 00012b10 in public OnPlayerWeaponShot (playerid=0, weaponid=24, hittype=1, hitid=1, Float:fX=-0.01489, Float:fY=0.11218, Float:fZ=0.68402) at C:\Users\stefan\Desktop\Fusion Gaming NEW\Compiler\include\weapon-config.inc:3450
[19:05:06] [debug] Run time error 11: "Divide by zero"
|
Can you compile the gamemode with -d3 flag?
create a pawn.cfg file in `pawno` folder and re-compile the gamemode
EDIT: nvm, found why.
https://github.com/Kaperstone/samp-weapon-config
I assume that if it already divides by zero, then it should return 1.
Actually, 1, and the other function might return the same, lemme edit it as well.
EDIT2: done.
Re: weapon-config.inc - Damage system with many features -
Max_Andolini - 19.03.2018
Quote:
Originally Posted by Kaperstone
What is the difference between this and the existing one except, as I see, only my pull request and lots of space added after for and if.
Can you compile the gamemode with -d3 flag?
create a pawn.cfg file in `pawno` folder and re-compile the gamemode
EDIT: nvm, found why.
|
I added this and your fix.
http://forum.sa-mp.com/showpost.php?...&postcount=734
Re: weapon-config.inc - Damage system with many features -
Kaperstone - 19.03.2018
Quote:
Originally Posted by Max_Andolini
|
Alright, add also the divide by zero for people using the average hit/shots
I don't know whether Slice will merge the pull requests.
Re: weapon-config.inc - Damage system with many features -
Max_Andolini - 19.03.2018
Quote:
Originally Posted by Kaperstone
Alright, add also the divide by zero for people using the average hit/shots
I don't know whether Slice will merge the pull requests.
|
I will be interested when I am available.
Re: weapon-config.inc - Damage system with many features -
IdonTmiss - 25.03.2018
How to remove the death animation so its default is it possible?
Re: weapon-config.inc - Damage system with many features -
Kaperstone - 25.03.2018
Quote:
Originally Posted by IdonTmiss
How to remove the death animation so its default is it possible?
|
Comment this line
https://github.com/oscar-broman/samp...nfig.inc#L4813
in your source
If you want to disable specific death animation, modify this part.
https://github.com/oscar-broman/samp...nfig.inc#L4682
Re: weapon-config.inc - Damage system with many features -
Hitropl - 17.04.2018
I can disable or fix this problem: custom health/armour bar? Because over the player 0 health is drawn on top and when the damage is taken, the health/armour bar value does not change
Re: weapon-config.inc - Damage system with many features -
Uberanwar - 21.04.2018
I got a weird issue, falling and explosions does not affect my health.
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 21.04.2018
Quote:
Originally Posted by Uberanwar
I got a weird issue, falling and explosions does not affect my health.
|
Can you show your OnPlayerDamage?
Re: weapon-config.inc - Damage system with many features -
Uberanwar - 21.04.2018
Quote:
Originally Posted by Jeroen52
Can you show your OnPlayerDamage?
|
Код:
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;
}