Re: weapon-config.inc - Damage system with many features -
Prokill911 - 23.10.2016
I finally got it to compile.
But it doesn't actually do the damage I want it too do.
It does the default (Samp) Default still.
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 30.10.2016
Quote:
Originally Posted by Prokill911
I finally got it to compile.
But it doesn't actually do the damage I want it too do.
It does the default (Samp) Default still.
|
Did you fix your issue with custom damage? I'll be able to assist you.
Re: weapon-config.inc - Damage system with many features -
Gammix - 12.02.2017
Why don't you use the GTA Health and Armour bar anyways?!
I mean if the player is hacking it's hiss fault, you can always set the health bar to 0.1 when the player should be declared dead by your include. Or you can set this optional when using "SetHealthBarVisibility", setting it false will toggle GTA Health & Armour bar.
Re: weapon-config.inc - Damage system with many features -
Unrea1 - 12.02.2017
This include don't detect godmode of s0b3it.
Code (in blank gamemode):
Code:
// ** ETC code...
public OnGameModeInit()
{
SetGameModeText("blank gamemode");
UsePlayerPedAnims();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 270.1425, false, false, false, false, -1, -1);
SetVehiclePassengerDamage(true);
SetDisableSyncBugs(true);
return true;
}
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
SendClientMessage(playerid, -1, "OnPlayerDamage called");
new Float:MP;
GetPlayerArmour(playerid, MP);
if(MP > amount)
{
SetPlayerArmour(playerid, MP - amount);
return false;
}
else if(MP > 0) SetPlayerArmour(playerid, 0.0);
return true;
}
Test in-game:
https://youtu.be/Xvw_XJKD1oo
And another problem of the include is that by default if you have (legal) armor to do damage the player does not subtract, you have to program that function in the callback OnPlayerDamage, as I showed in the code.
Re: weapon-config.inc - Damage system with many features -
Crayder - 12.02.2017
Quote:
Originally Posted by Gammix
Why don't you use the GTA Health and Armour bar anyways?!
I mean if the player is hacking it's hiss fault, you can always set the health bar to 0.1 when the player should be declared dead by your include. Or you can set this optional when using "SetHealthBarVisibility", setting it false will toggle GTA Health & Armour bar.
|
It's for the fake health. The real health bar isn't going to display the correct health because it's set to a fake value.
Re: weapon-config.inc - Damage system with many features -
Gammix - 12.02.2017
Quote:
Originally Posted by Crayder
It's for the fake health. The real health bar isn't going to display the correct health because it's set to a fake value.
|
Nevermind, natural death will ruin it.
Re: weapon-config.inc - Damage system with many features -
HydraHumza - 13.02.2017
Is there any issue with it? weapon-config hang the server on startup for me
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 13.02.2017
Quote:
Originally Posted by Humza
Is there any issue with it? weapon-config hang the server on startup for me ![huh](images/smilies/confused.gif)
|
Are you certain that you have done the include priority correctly? Or implemented the code correctly? Are some dependencies missing?
Re: weapon-config.inc - Damage system with many features -
HydraHumza - 13.02.2017
Quote:
Originally Posted by Jeroen52
Are you certain that you have done the include priority correctly? Or implemented the code correctly? Are some dependencies missing?
|
Yes. I follow the whole guide that mention in the release github. IDK, I am the only one who is facing this issue.
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 13.02.2017
Quote:
Originally Posted by Humza
Yes. I follow the whole guide that mention in the release github. IDK, I am the only one who is facing this issue.
|
Do you have a log that we can look into?
Re: weapon-config.inc - Damage system with many features -
Unrea1 - 13.02.2017
Quote:
Originally Posted by Jeroen52
Perhaps by using custom fall damage, as is documented in the include readme. However I am not using custom fall damage due to it being difficult to understand and even more difficult to properly configure.
|
Jeroen, the problem of godmode is that not only does the fall affect the player, but any means of damage, fire, explosions, shots, car crashes, and any other method of damage, and that is a serious problem since it gives a Masterful advantage to the player in a shooting or anything ...
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 13.02.2017
Quote:
Originally Posted by Fynn.
Jeroen, the problem of godmode is that not only does the fall affect the player, but any means of damage, fire, explosions, shots, car crashes, and any other method of damage, and that is a serious problem since it gives a Masterful advantage to the player in a shooting or anything ...
|
If a player has godmode on, and another player shoots at the cheater with godmode, does the health decrease from the cheater?
Re: weapon-config.inc - Damage system with many features -
Unrea1 - 13.02.2017
Quote:
Originally Posted by Fynn.
|
Is there any solution with this include for the godmode?
Re: weapon-config.inc - Damage system with many features -
Unrea1 - 13.02.2017
I do not have the possibility to test with another person, but looking at how s0b3it works, when one person shoots another, the hacker does not apply any animation, practically the hacker omits that they have been shot, although I am not sure it will detect this include.
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 13.02.2017
Quote:
Originally Posted by Fynn.
Is there any solution with this include for the godmode?
|
Perhaps by using custom fall damage, as is documented in the include readme. However I am not using custom fall damage due to it being difficult to understand and even more difficult to properly configure.
Re: weapon-config.inc - Damage system with many features -
Jeroen52 - 13.02.2017
Quote:
Originally Posted by Fynn.
I do not have the possibility to test with another person, but looking at how s0b3it works, when one person shoots another, the hacker does not apply any animation, practically the hacker omits that they have been shot, although I am not sure it will detect this include.
|
In my case, most health hacks are no longer effective when a player enables them and they get shot at or damaged in many other ways.
Re: weapon-config.inc - Damage system with many features -
Gammix - 14.02.2017
Quote:
Originally Posted by Fynn.
I do not have the possibility to test with another person, but looking at how s0b3it works, when one person shoots another, the hacker does not apply any animation, practically the hacker omits that they have been shot, although I am not sure it will detect this include.
|
You can use "IsPlayerFacingPlayer" and "GetPlayerAnimationIndex" under "OnPlayerWeaponShot" or even under "OnPlayerKeyStateChange" (with KEY_FIRE) to check if the player shot was legit.
Re: weapon-config.inc - Damage system with many features -
Unrea1 - 14.02.2017
Well, bypassing the "godmode" problem, when an NPC (FCNPC plugin) attacks a player, the player does not receive any damage, not even the callback is called, and killing an NPC appears in the console:
PHP код:
[debug] Run time error 4: "Array index out of bounds"
[debug] AMX backtrace:
[debug] #0 0000a1cc in public OnPlayerDeath (playerid=7, killerid=65535, reason=51) at D:\Pawn\LEP Mysql\pawno\include\weapon-config.inc:2494
Any ideas?
EDIT:
Fixed, i added in OnPlayerTakeDamage this code:
PHP код:
if(IsPlayerNPC(issuerid))
{
InflictDamage(playerid, amount, issuerid, weaponid, bodypart);
return 0;
}
And in OnPlayerDeath:
PHP код:
if(IsPlayerNPC(issuerid))
{
return 0;
}
Re: weapon-config.inc - Damage system with many features -
X337 - 15.02.2017
I got a problem when a player death in a vehicle, the player spawned in blueberry / default spawn location after died and also spawned with a bottle / cigarette in their hand.
Does everyone else facing this issue?
It seems the problem is only when i host the gamemode, because it doesn't appear while i'm testing it on local.
Re: weapon-config.inc - Damage system with many features -
HydraHumza - 15.02.2017
Quote:
Originally Posted by X337
I got a problem when a player death in a vehicle, the player spawned in blueberry / default spawn location after died and also spawned with a bottle / cigarette in their hand.
Does everyone else facing this issue?
It seems the problem is only when i host the gamemode, because it doesn't appear while i'm testing it on local.
|
Same issue + it hang up on the login screen when we use PAWN.CMD I don't know why.