16.02.2015, 19:21
Yes - you may modify them. See the post before yours.
Here are a few more examples:
Here are a few more examples:
pawn Код:
public OnPlayerDamage(playerid, &Float:amount, &issuerid, &weapon, &bodypart) {
// Disable helikill and carpark
if (weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES)
{
return 0;
}
// Ignore low fall damage
if (weapon == WEAPON_COLLISION && amount < 10.0)
{
return 0;
}
// the time in milliseconds between the last 3 shots
// SHOT - time - SHOT - time - SHOT
new avg_rate = AverageShootRate(issuerid, 2);
// Lower rapid fire damage (C-bug fast shooting)
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;
}
}
// Increase headshot damage
if (IsBulletWeapon(weapon) && bodypart == 9) {
amount *= 1.25;
}
return 1;
}