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 Accessories Item

Discussion in 'Discussion' started by Carrot, Dec 19, 2016.

  1. Code:
    local ITEM = Clockwork.item:New("accessory_base");
    
    ITEM.name = "Olive Armor";
    ITEM.model = "models/warz/olivearmor.mdl";
    ITEM.business = false;
    ITEM.batch = 1;
    ITEM.weight = .3;
    ITEM.category = "Armor";
    ITEM.uniqueID = "Olivea";
    ITEM.description = "This is Olive Armor.";
    ITEM.isAttachment = true;
    ITEM.attachmentBone = "ValveBiped.Bip01_Spine1";
    ITEM.attachmentOffsetAngles = Angle(0, 90, 0);
    ITEM.attachmentOffsetVector = Vector(0, 0, -56);
    
    function ITEM:GetAttachmentVisible(player, entity)
       return player:GetNWBool(self("uniqueID"));
    end;
    
    function ITEM:OnWearAccessory(player, bIsWearing)
       if (bIsWearing) then
         Clockwork.player:CreateGear(player, self("uniqueID"), self);
         player:SetNWBool(self("uniqueID"), true);
       else
         local gearEntity = Clockwork.player:GetGear(player, self("uniqueID"));
       
         if (IsValid(gearEntity)) then
           gearEntity:Remove();
         end;
       
         player:SetNWBool(self("uniqueID"), false);
       end;
    end;
    
    ITEM:Register();
    

    http://imgur.com/a/MeB6c

    I need help.
    I want to know how to find the coordinates.
    And attachmentBone
     
  2. Just play around with it a little bit. I'd start off with your angles, once you have that figured out then move onto your vectors. Set them all to zero and play around with them.
     
    • Agree Agree x 1
  3. Admiral Soviet

    Admiral Soviet Clockwork Customer

    Pretty much just do what cash wednesday said.
    There's no real easy way to get the positions you want. You just have to experiment until you get the result you like. With experience you gain a sense of intuition about this kind of thing and can usually get the intended results quicker.
     
  4. wish the accessory base used the same shit as pac regarding angles, that'd make it alot easier lol
     

Previous Readers (Total: 0)