View Single Post
Old 15/02/2015, 05:05 PM   #1
Join Date: Mar 2008
Posts: 1,831
Reputation: 1607
Spray - Damage system with many features

This is an include that provides a more consistent and responsive damage system with many new features.

It's pretty much plug-and-play if you don't have any filterscripts that interfere with the health or death events.

Demo server

HostName: Slice's test server
Players:  0 / 100
Ping:     42
Mode:     Slice's test gm
Map:      San Andreas
  • Server-side health
    • Impossible to use health hacks on lagcomp mode
    • Any type of damage can be modified/prevented, even falling 1000m from the sky
    • Vending machines are controlled server-side (buildings removed and objects created)
    • Paused players can be killed (with death animations) and their HP bars always show the correct values
  • Destroy vehicles with a passenger but no driver
  • Custom falling damage (optional)
    • Adjust the damage and at which speed a player will die
  • Sounds and on-screen TextDraw indicators of damage given/taken
    • Also shows another player's damage feed when spectating
  • New weapon types detected:
    • WEAPON_PISTOLWHIP - When you punch someone with a gun
    • WEAPON_VEHICLE_M4 - Vehicles with M4 guns (e.g. Rustler)
    • WEAPON_VEHICLE_MINIGUN - Vehicles with miniguns (e.g. Hunter)
    • WEAPON_HELIBLADES - Helikill
    • WEAPON_CARPARK - When you park your car on someone
  • Extensive sanity checking on shots:
    • Modified weapon.dat is automatically detected
    • Shot vector, player distance, and much more is examined
    • A callback is invoked for each so-called "rejected hit" so that the player is informed. A few of these are:
      • Inflicting damage when already dead (due to lag)
      • Hit a player too far from the shot hit position (due to severe lag or cheating)
      • Hitting/shooting too fast (due to severe lag or cheating)
  • Modify every weapon's damage amount
    • To a single value
    • To multiple values depending on the shot distance
    • With custom logic in a callback, for example:
      • Increase damage for headshots
      • Increase/lower damage for combos
      • Lower damage for c-bug rapid fire
  • Knife sync fixed in both lagcomp and no-lagcomp
  • New death atnimations and respawn logic
    • Customize respawn time globally and for each death
    • Fully customizable animations, with a nice set of defaults
    • Different animation depending on weapon/bodypart, for example:
      • Headshots make you fall back with both hands in your face
      • Shotgun kills make you fly backward like in GTA:VC (unless killed from behind)


Slice is offline   Reply With Quote