1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

HL2RP TFA

Discussion in 'Discussion' started by Renegade Rebel, Jun 25, 2019.

  1. Renegade Rebel

    Renegade Rebel Clockwork Customer

    Good Evening,
    Was wondering if anyone would know how to/has a fix to add the TFA base to HL2RP. Anything helps. At this point, it's a headache kinda deal. I could probably manage to code it myself but if there's a known and existing fix out there, I'd sure love to try exhausting that before anything.
    Thanks!
     
    • Good Coder Good Coder x 1
  2. svensis_

    svensis_ Clockwork Customer

    This is how some plugin did it with FAS and CW2.0, maybe it helps.
    Code:
    function PLUGIN:ShouldWeaponMenuOpen(player, oldIndex, newIndex)
        local weapon = player:GetActiveWeapon()
    
        if (((weapon.IsFAS2Weapon or weapon.IsSXBASEWeapon) and weapon.dt.Status == FAS_STAT_CUSTOMIZE) or (weapon.CW20Weapon and weapon.dt.State == CW_CUSTOMIZE)) then
            return false
        end
    end
    
    function PLUGIN:OnWeaponRaised(player, weapon, bIsRaised)
        if (IsValid(weapon)) then
            if (weapon.IsFAS2Weapon or weapon.CW20Weapon or weapon.IsSXBASEWeapon) then
                if (weapon.FireMode == "safe") then
                    weapon:SelectFiremode(weapon.FireModes[2])
                else
                    weapon:SelectFiremode("safe")
                end
            end
        end
    end
    
    function PLUGIN:ShouldWeaponBeRaised(player, weapon)
        if (weapon.IsFAS2Weapon or weapon.CW20Weapon or weapon.IsSXBASEWeapon) then
            return weapon.FireMode != "safe"
        end
    end
    
    function PLUGIN:CanWeaponBeToggled(player, weapon)
        if (((weapon.IsFAS2Weapon or weapon.IsSXBASEWeapon) and weapon.dt.Status != FAS_STAT_IDLE) or (weapon.CW20Weapon and weapon.dt.State != CW_IDLE)) then
            return false
        end
    
        return true
    end
     
    • Good Coder Good Coder x 1

Previous Readers (Total: 0)