1. Visit the donators section and enjoy 50% off on single awards and packages during the 2019 spring sale!
  2. Make sure you are using our new web and server addresses or the server might appear offline for you! The same are: www.lsb-rp.com for the web and play.lsb-rp.com:7777 for the server!
Dismiss Notice
What's up, baby? If you are ready to start your journey on the streets, register an account now and meet up the homies!

Custom Damages and Injury System [UPDATED: 11/Sep/2016]

Discussion in 'Feature Documentation' started by michael, Sep 2, 2016.

Thread Status:
Not open for further replies.
  1. michael

    michael Lead Community Manager

    Jul 7, 2007
    Likes Received:
    Feature Overview

    Script Category: Damages/Weapons
    Script Author(s): michael
    Beta Tester(s): LakeB, Lamar_K, Tom, Kiko, Ryhes, Jason, Respi
    Comments/Description: It have been suggested several times to create an injury system for more realism, there have also been suggestions about custom/realistic damages, you might think they were left out without being noticed, that's not true! Some of you may know or may not know about our previous injury and damages system, damages were unbalanced and you weren't able to kill an injured person with any weapon except fist, which was pretty much retarded in my opinion, when you have a shootout - you go and stomp every victim that lays on the ground... well, we've put an end to that! With this new rewritten system, the injured person can move his camera around, can be killed (ofcourse with weapons too, not only fists) and what not, you'll no longer have to roleplay shooting them and ask them to /acceptdeath instead of shooting them for real!

    Feature Explanation

    The system is simple, it consists of few important commands, everything else is automated. Every hit/shot the player took the last 15 minutes are stored in their /damages information, which will show up above their head if they're in injured mode, screenshots will be shown below.

    † Weapons that do actual damage are:
    • All melee weapons from Brass to Chainsaw
    • Colt45, Silenced Colt45, Deagle
    • MP5, Tec-9, UZI
    • Shotgun, Sawn-off Shotgun
    • AK-47, M4, Country Rifle, Sniper Rifle
    † Below is a screenshot of how the custom damages are defined:
    If the player got hit or shot and 15 minutes pass, their /damages information will be reset unless someone hits/shoots them again in the meantime, the timer resets and this player will have to wait 15 more minutes in order for their damages to reset, it's made like that, so if they heal and get shot at again, their damages information won't be spammed with 30-40 shots that a normal person can't survive.

    Commands, restrictions and screenshots

    Once you get in injured mode, ofcourse, you won't be able to do some actions, we thought of it and we didn't want to restrict too many commands, so the final decision was the following:

    † Available commands & limits/restrictions:
    • [​IMG] /revive [playerid] - Self explanatory, revives an injured player nearby if you have a first aid kit.
    • [​IMG] /rm [playerid] - Removes the mask of an injured player nearby.
    • [​IMG] /damages [playerid] - Shows the damages information of an injured player nearby.
    • [​IMG] /acceptdeath - Ends your life if atleast 60 seconds passed since you've been injured.
    • [​IMG] /passfa - Pass a first aid kit to a nearby player.
    • [​IMG] /exitdm - Exits the death/afterlife mode after the time's up.
    • [​IMG] You can't carry more than 2 first aid kits on yourself.
    • [​IMG] You can't use the first aid kit on yourself, another player must revive you.
    • [​IMG] You can't use the /shout, /sms, /maskon & /maskoff commands.
    • [​IMG] You can't use the normal talk, you'll use auto-/low instead.
    • [​IMG] You can't jump, walk, run, crouch, roll, swim etc.
    • [​IMG] You can't use any animation or special action.
    • [​IMG] You can't get in a vehicle as passenger or driver.
    • [​IMG] You can't drop any weapon, you can still /passgun, though.
    • [​IMG] You can't revive/unmask any injured player while you're in injured/death mode.
    NOTE: Trying to abuse RETURN/G to enter a vehicle will NOT work, you'll be put back in injured animation on the place you've been injured, the second time the system will force death on you!


    [​IMG] - Available Command
    [​IMG] - Official Feature Limit

    If that still doesn't make it clear for you, we've prepared few screenshots to see the system in action!
    (The following screenshots may be outdated as the system was improved recently!)


    [​IMG] [​IMG]

    Shown on the right, is how other player see you when you die or bleed out, we're taking advantage of the SA-MP 0.3.7 actors so we can leave a dead body laying in blood on the place you died.
    After you die, you'll spawn normally, noone will be able to revive you and you will not spawn at the hospital, but your normal faction spawn/house spawn.
    Want to discuss and vote for this system? Post a thread and run a poll at General Discussions.
    Want to report a bug related to this system? Head to the Bug Reports section.
    #1 michael, Sep 2, 2016
    Last edited: Jul 22, 2018
  2. michael

    michael Lead Community Manager

    Jul 7, 2007
    Likes Received:
    [23rd of November 2016]
    • When you get revived, you'll have a cooldown of 3 minutes to recover fully.
    • After being revived, you won't be able to jump/sprint nor shoot accurately till you recover.
    • Final release.
    [15th of September 2016]
    • Added colors to the /damages dialog.
    • Fixed a bug where if you get revived by two players at the same time, you get bugged.
    [11th of September 2016]
    • Removed the weather effects when you're injured.
    • The bug where your screen was stuck in fade-black has been fixed.
    • Issues related to unmasking injured players have been fixed.
    • Updated the weapon damages list.
    [10th of September 2016]
    • You'll now lose your first aid kits on death.
    • Adjusted the head hits damages.
    • Hits in the arms and legs are now separated.
    • Improved the /damages information, now it separates melee hits and weapon shots.
    • You'll lose health slower than usual when you're injured for a bigger chance of survival.
    • You no longer can be revived again if someone else is currently reviving you.
    [8th of September 2016]
    • Tazer, Spraycan and Fire Extinguisher won't do damage anymore so they can be used properly.
    • Fixed issues with the position re-setting while in injured mode.
    • Fixed issues related to the death animation.
    • Added new command - /exitdm to exit death mode after the time's up.
    • You won't be able to use any commands except /pm, /r, /report and /helpme and /exitdm while in afterlife.
    • Fixed a bug where you were able to kill dead players once again, causing them to get bugged by stomping on them.
    • Improved the damage detection for a more stable system.
    • Removed the force-animation when you revive someone.
    • If you log out while injured, you'll spawn on the same position on your next login.
    • If you log out while injured and masked, you'll spawn masked with the same mask ID on your next login.
    • Fixed a bug where you were able to enter vehicles when in death mode.
    • You can no longer remove the mask of injured players when you're in injured/death mode.
    [7th of September 2016]
    • Fixed the injured animation and respawning method.
    • Adjusted the weapon damages slightly.
    • The GTA:SA default damage has been removed, only the custom will be applied.
    • Removed the dead body actors, instead we'll leave the actual player there for few seconds.
    • Fixed a bug where your damages information label was disappearing.
    • Added new afterlife and recovery system.
    • Added animations when you're being shot in the legs.
    • Added screen fader when you're about to die.
    • Custom death system has been made.
    • Revamped the whole custom damages code.
    • Fixed a bug where when you press TAB and your screen is faded, you can still see around.
    [2nd of September 2016]
    • Initial release.
    • Bug fixes.
    • Basic features.
    #2 michael, Sep 7, 2016
    Last edited: Apr 21, 2017
    Kane likes this.
Thread Status:
Not open for further replies.