1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
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!

Help with armor plugin, changing models

Discussion in 'Requests' started by Papabear3g, Dec 22, 2017.

  1. Papabear3g

    Papabear3g Clockwork Customer Active Member

    Does anyone know how to change the gasmask armor model? No matter what I change whether it's the base lua or item lua, it's still the breen.mdl I'm not the most experienced with lua coding for source so help would be appreciated. Thank you
  2. What is the name of your plugin?
  3. Papabear3g

    Papabear3g Clockwork Customer Active Member

    The plugin I'm using is Armor by Gr4Ss, sorry, forgot to make that more specific
  4. If i get you right you should find needed item that places in armor\plugin\items directory and change the string named ITEM.replacement.
  5. Freelok

    Freelok Guest

    Here is a base example of an item:
    local ITEM = Clockwork.item:New("armor_clothes_base");
    ITEM.name = "item";
    ITEM.uniqueID = "item";
    ITEM.spawnValue = 1;
    ITEM.isRareSpawn = true/false;
    ITEM.actualWeight = enter number for weight;
    ITEM.invSpace = entire number of inventory space;
    ITEM.protection = enter on a .0 scale;
    ITEM.maxArmor = max is 200 if i think, set from 0-200;
    ITEM.repairAmount = the repair amount for when the item is repaired;
    ITEM.hasGasmask = true/false, depends if the item can support a filter to block out toxins;
    ITEM.isAnonymous = true/false, determines whether or not the item renders the wearer anonymous and unidentifiable;
    ITEM.replacement = "insert the model you want to use ";
    ITEM.description = "enter the description you wish to use for your item here";
    ITEM.repairItem = "whatever you want to have your item repaired with- so say you have cloth_scraps, you'd put "cloth_scraps" in this";
    ITEM.business = true/false, determines whether or not the item can be sold on the business menu;
    ITEM.access = "the flag that the item requires to be purchased/spawned";
    ITEM.cost = the token amount that the item has to be purchased for from the business menu;

    ITEM:AddData("Rarity", put the numbers 1-5 to dictate rarity (1 is common, 2 is uncommon, 3 is rare, 4 is [i forget], 5 is legendary);

    Here's an item I've made off of the base:
    local ITEM = Clockwork.item:New("armor_clothes_base");
    ITEM.name = "Riot Outfit";
    ITEM.uniqueID = "riot_outfit";
    ITEM.actualWeight = 6;
    ITEM.batch = 3;
    ITEM.invSpace = 2;
    ITEM.protection = 0.55;
    ITEM.maxArmor = 150;
    ITEM.hasGasmask = true;
    ITEM.isAnonymous = true;
    ITEM.replacement = "models/bloocobalt/l4d/riot_09.mdl";
    ITEM.description = "A riot suit, equipped with a gasmask and shock obsorbant visor. (Have your model changed, there are multiple.)";
    ITEM.business = false;
    ITEM.access = "q";
    ITEM.cost = 500;

    ITEM:AddData("Rarity", 3);


    Hope that helps.
  6. Papabear3g

    Papabear3g Clockwork Customer Active Member

    Thank you it really did, I finally got that part working. I was under the impression I had to customize the customizable armor lua. Although I have one more question, would you know how to apply the gas mask from the HL2TS2 clothing plugin? The only reason I'm asking this is because it's a bodygroup thing so it only equips the gas mask and doesn't appear to change the entire skin. In case you're not sure which plugin : http://forums.cloudsixteen.com/threads/daemons-magical-emporium-v1-0.7452/
    Last edited: Dec 23, 2017
  7. Freelok

    Freelok Guest

    I'm not entirely sure, but maybe it would be something like ?
    local ITEM = Clockwork.item:New();
    ITEM.name = "Gasmask";
    ITEM.model = "models/tnb/items/gasmask.mdl";
    ITEM.weight = 0.8;
    ITEM.useText = "Wear Mask";
    ITEM.category = "Clothing";
    ITEM.description = "An old rubber GP-5 Gasmask, has an uncomfortable fit for the big heads, better to use this if needed.";
    ITEM.customFunctions = {"Remove"};
    ITEM.hasGasmask = true;
    ITEM.isAnonymous = true/false;

    ITEM.access = "1";
    ITEM.business = true;

    local bodyGroup = 4;
    (also keep the code under here, it was just unnecessary to post as you only needed to stuff to the ITEM.'s.)
    That may or may not work, I am in all honesty not sure. I'll test it out in a few minutes.

Previous Readers (Total: 0)