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!

Adding a new Armour

Discussion in 'Discussion' started by Bescharlie, Jul 30, 2013.

  1. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Heya guys, i was wandering what the lua file for a new set of armour would look like? Like an example of the custom Armour lua without all the extra writing? I tried on my own and failed :( Armour was invisible.

    And yes i did put all teh textures on models on teh server, before anyone says it was that :)

    Also how would one set a spawn icon?
     
  2. Bloodprime

    Bloodprime WARPAC Lead

    Code:
    local ITEM = Clockwork.item:New("custom_clothes");
     ITEM.cost = 250;
     ITEM.name = "Example";
     ITEM.weight = 1;
     ITEM.business = true;
     ITEM.replacement = "models/example.mdl";
     ITEM.description = "An item of clothing used as an example.";
    ITEM:Register();
    The spawn icon is generated by Clockwork automatically.
     
  3. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Ohhh.. Thats what i did? I shall try with a different model :) Thanks for teh feedback though :)
     
  4. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Oh yeah, one more thing, you know how there is item.Cost , item.weight etc?

    Well i know that their is a few more not in that example, like what tab it comes under in buisness- can somebody please give me a lift of all those different variables? :)
     
  5. Faoeoa

    Faoeoa Bored as shit, will do simple devving.

    The tab is item.access = "v";

    Change that to a certain flag if you want it to be there.
     
  6. Code:
    ITEM.access
    Lua is case sensitive.
     
  7. Bloodprime

    Bloodprime WARPAC Lead

    I think that you both misunderstood him, he means the category of the item, for example; Weapon/Food/Miscellaneous.

    I believe it's: ITEM.class ?
     
  8. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Yup that guy has it right :)
     
  9. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    I found it, it was ITEM.category
     
  10. mallic

    mallic Clockwork Customer

    local ITEM = Clockwork.item:New("clothes_base");
    ITEM.cost = 0;
    ITEM.name = "T51B Power Armor";
    ITEM.weight = 1.5;
    ITEM.replacement = "models/power_armor/slow.mdl";
    ITEM.description = "A suit of mechanical power armor. The breastplate is labeled T-51B.";
    ITEM.protection = .9
    ITEM.batch = 1;
    Clockwork.item:Register(ITEM);

    Hey if you still need an example of a working armor item that adds protection, here is one. I would recommend setting the ITEM.protection value lower though as it currently negates 90% of damage.
     
  11. Faoeoa

    Faoeoa Bored as shit, will do simple devving.

    You're forgetting ITEM.access - without it, it'd just be admin-grantable ONLY.
     
  12. mallic

    mallic Clockwork Customer

    I have it so that certain factions start with it. And it is sold by a quartermaster for the faction.
     

Previous Readers (Total: 0)