1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

CustomHQ Defibrillator LUA Question

Discussion in 'DarkRP Modding Questions & Help' started by [DEFN] Raven, Jun 25, 2020.

  1. [DEFN] Raven

    [DEFN] Raven New Member

    I'd like to know what code and where I would have to place it to make it so that the CustomHQ Defibrillators are unusable for a set amount of time when you take damage. (This is because I don't want people to revive other people in combat).
     
  2. Zaktak

    Zaktak Member

    Code (Text):
    hook.Add( "EntityTakeDamage", "Example Name", function(ent, info)
    if (!ent:IsPlayer) then return end
    if (!IsValid(ent)) then return end

    if (ent:GetActiveWeapon():GetPrintName() == "defib_name_thingy" ) then
    ent:GetActiveWeapon():SetNextPrimaryFire( 5 ) -- delay
    end
    end)
    wrote this up rly quickly so idk might work lol
     

Share This Page