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!

Other Making an accessory that works with Gr4Ss' gaszones/armor plugin?

Discussion in 'Development' started by Boneblaster, Mar 24, 2018.

  1. Boneblaster

    Boneblaster Clockwork Customer

    Is it possible? This post said by him back in 2014 says no.
    [​IMG]
    Could it work with his equipableitem accessory-base? Been experimenting but no dice.
     
  2. Code:
    function playerMeta:HasRebreather()
        local clothes = self:GetClothesItem();
        return clothes and clothes("hasRebreather", false);
    end;
    
    function playerMeta:HasGasmask()
        local clothes = self:GetClothesItem();
        return clothes and clothes("hasGasmask", false) and !clothes("hasRebreather");
    end;
    Just to help whomever does this: to make your item work with the armor plugin you basically just need to update these two functions in the armor plugin's sv_plugin.lua to correctly check for whatever item you make as well. The filter_base/armor plugin will handle everything correctly from there, and the gas zones just hook into the armor plugin.

    Not sure if you can do it with the equipable item base, never tried making anything with it that also creates a gear entity on the player.
     
  3. Boneblaster

    Boneblaster Clockwork Customer

    Thank you for the response. How could this be done?
     
    • Funny Funny x 1

Previous Readers (Total: 0)