13.07.2015, 09:29
The rates are set default to allow cbug rapid-fire.
Here's what I use for my c-bug skinhit server:
Also, in OnPlayerDamage:
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);
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;
}
}