[Include] weapon-config.inc - Damage system with many features

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.
Reply

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.
Reply

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.
Reply

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.
Reply

Quote:
Originally Posted by Gammix
View Post
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.
Reply

Quote:
Originally Posted by Crayder
View Post
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.
Reply

Is there any issue with it? weapon-config hang the server on startup for me
Reply

Quote:
Originally Posted by Humza
Посмотреть сообщение
Is there any issue with it? weapon-config hang the server on startup for me
Are you certain that you have done the include priority correctly? Or implemented the code correctly? Are some dependencies missing?
Reply

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.
Reply

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?
Reply

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 ...
Reply

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?
Reply

Quote:
Originally Posted by Fynn.
View Post
...
Test in-game: https://youtu.be/Xvw_XJKD1oo
...
Is there any solution with this include for the godmode?
Reply

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.
Reply

Quote:
Originally Posted by Fynn.
View Post
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.
Reply

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.
Reply

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.
Reply

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 код:
[debugRun time error 4"Array index out of bounds"
[debugAMX 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(playeridamountissueridweaponidbodypart);
        return 
0;
    } 
And in OnPlayerDeath:

PHP код:
if(IsPlayerNPC(issuerid))
    {
        return 
0;
    } 
Reply

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.
Reply

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.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)