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

Quote:

What is SetDisableSyncBugs doing?

This is to fix certain sync bugs (pretty self explanatory, ehh), such as the 'knifed' sync.
Quote:

I am looking to figure out how SetCustomFallDamage works.

This is like the most complicated part of the include. Slice still hasn't got it 100% figured out, but it does work. Refer to the github readme for this stuff.

About the spawn-get-skin, you should report that on the github.
Reply
#82

Quote:
Originally Posted by Crayder
Посмотреть сообщение
This is to fix certain sync bugs (pretty self explanatory, ehh), such as the 'knifed' sync.This is like the most complicated part of the include. Slice still hasn't got it 100% figured out, but it does work. Refer to the github readme for this stuff.

About the spawn-get-skin, you should report that on the github.
It does seem like one of the most ocmplicated part.

I have a little problem with the health bar textdraw, it isn't on my health bar correctly.
Don't get me wrong it is still visible, it is just not on there correctly.



I also adjusted the damage of the AK using this
Код:
SetWeaponDamage(31, DAMAGE_TYPE_STATIC, 11.90);
But I still deal out the default damage of the AK (9.90).

Edit: I placed it in OnGamemodeInit.
Edit2: Silly me, AK is weapon ID 30.
Edit3: Since health is server sided, both health and armour can't be hacked anymore, right?
Edit4: If you have a list of SetWeaponShootRate(weaponid, max_rate); for weapons you can c-bug, can you send it?
Reply
#83

[QUOTE=Jeroen52;3517690]Edit3: Since health is server sided, both health and armour can't be hacked anymore, right?
Edit4: If you have a list of SetWeaponShootRate(weaponid, max_rate); for weapons you can c-bug, can you send it?/QUOTE]

@3: True. Neither can be hacked.
@4: I don't have a list, but I could make one. However, if you are trying to prevent C-Bug, it's think already being done by default. To test it put some debug messages in OnRejectedHit and try to C-Bug.
Reply
#84

[quote=Crayder;3518057]
Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
Edit3: Since health is server sided, both health and armour can't be hacked anymore, right?
Edit4: If you have a list of SetWeaponShootRate(weaponid, max_rate); for weapons you can c-bug, can you send it?/QUOTE]

@3: True. Neither can be hacked.
@4: I don't have a list, but I could make one. However, if you are trying to prevent C-Bug, it's think already being done by default. To test it put some debug messages in OnRejectedHit and try to C-Bug.
I have tried to c-bug, and I am bad at c-bugging.
I was able to kill someone within 1 second with the Deagle.
Reply
#85

[quote=Jeroen52;3518535]
Quote:
Originally Posted by Crayder
Посмотреть сообщение
I have tried to c-bug, and I am bad at c-bugging.
I was able to kill someone within 1 second with the Deagle.
Download an auto-cbug or rapid-fire mod, they are both disregarded when using this include.
Reply
#86

The rates are set default to allow cbug rapid-fire.

Here's what I use for my c-bug skinhit server:
pawn Код:
SetWeaponDamage(
        WEAPON_SNIPER,
        DAMAGE_TYPE_RANGE,
        45.0,
        4.0, 35.0,
        90.0, 30.0
    );

    SetWeaponDamage(
        WEAPON_RIFLE,
        DAMAGE_TYPE_RANGE,
        37.5,
        4.0, 30.0
    );

    SetWeaponDamage(
        WEAPON_DEAGLE,
        DAMAGE_TYPE_RANGE,
        35.0,
        25.0, 25.0
    );

    SetWeaponDamage(
        WEAPON_SILENCED,
        DAMAGE_TYPE_STATIC,
        15.0
    );

    SetWeaponDamage(
        WEAPON_PISTOLWHIP,
        DAMAGE_TYPE_STATIC,
        10.0
    );

    SetWeaponDamage(
        WEAPON_M4,
        DAMAGE_TYPE_STATIC,
        8.0
    );

    SetWeaponDamage(
        WEAPON_AK47,
        DAMAGE_TYPE_STATIC,
        11.5
    );

    SetVehiclePassengerDamage(true);
    SetDamageSounds(1190, 17802);
    SetWeaponMaxRange(WEAPON_RIFLE, 140.0);
    SetWeaponMaxRange(WEAPON_M4,    100.0);
    SetWeaponMaxRange(WEAPON_DEAGLE, 40.0);
    SetWeaponMaxRange(WEAPON_SHOTGUN,50.0);
    SetWeaponMaxRange(WEAPON_AK47,  100.0);

    SetCustomFallDamage(true, 40.0, -0.75);
    SetDamageFeed(true);
    SetDisableSyncBugs(true);
    SetCustomVendingMachines(false);
Also, in OnPlayerDamage:
pawn Код:
if (weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES)
    {
        return 0;
    }

    if (weapon == WEAPON_COLLISION && amount <= 5.0)
    {
        return 0;
    }

    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;
        }
    }
Reply
#87

Код:
	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;
		}
	}
So using this you are punishing players for shooting very fast or c-bugging?

Also, I have noticed when you shoot a car without a driver and it explodes, when you leave the area and come back it will explode again.
Reply
#88

It's not really punishment.. I'm just making rapid fire less powerful. It balances out very well. Someone who can't rapid fire has a chance against someone that's rapid firing.
Reply
#89

Amazin'
Reply
#90

Can anyone give me link download plugin windows .dll for 0.3.7-R2 ?
Reply
#91

I have a problem where in certain situations, whenever you are on a bike and getting kicked, punched, or just falling off the bike at a high speed, you'll die instantly.
Even if the bike is stationary and you are getting punched off by carjacking there is a chance you'll instantly die because of a collision.
Reply
#92

Disable the custom damage system.
Reply
#93

Quote:
Originally Posted by Slice
Посмотреть сообщение
Disable the custom damage system.
Do you mean the custom falling damage? Because that is disabled already.
Reply
#94

Can you easily reproduce this?
Reply
#95

Quote:
Originally Posted by Slice
Посмотреть сообщение
Can you easily reproduce this?
It is quite easy, I don't know what the precise conditions are that causes the player to die, but carjacking a person on an NRG kills them.
I have tested it on a PCJ and it doesn't seem to kill.
Reply
#96

Do you see anything in the server log? Could you enable debug logging?
Reply
#97

Quote:
Originally Posted by Slice
Посмотреть сообщение
Do you see anything in the server log? Could you enable debug logging?
I have checked the logs after I died, nothing appeared.
I'm not sure how to debug this issue.
Reply
#98

Quote:
Originally Posted by Jeroen52
Посмотреть сообщение
I have checked the logs after I died, nothing appeared.
I'm not sure how to debug this issue.
First, do:
pawn Код:
//before including weap conf
#define WC_DEBUG
Reply
#99

JustMe.77, error continue

*Sorry for my bad english, please.
Reply

Quote:
Originally Posted by RogerCosta
View Post
JustMe.77, error continue

*Sorry for my bad english, please.
What about this?

#include <weapon-config>
#include <a_samp>
#include <SKY>
#include <foreach>
#include <zcmd>
#include <sscanf2>
#include <SII>
#include <cpstream>
Reply


Forum Jump:


Users browsing this thread: 37 Guest(s)