Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. local ITEM = Clockwork.item:New("accessory_base");
  2.  
  3. ITEM.name = "Red Armband";
  4. ITEM.model = "models/tyrex_armband/armredm.mdl";
  5. ITEM.business = false;
  6. ITEM.batch = 1;
  7. ITEM.weight = .3;
  8. ITEM.category = "Armor";
  9. ITEM.uniqueID = "Olivea";
  10. ITEM.description = "A red armband.";
  11. ITEM.isAttachment = true;
  12. ITEM.attachmentBone = "ValveBiped.Bip01_r_upperarm";
  13. ITEM.attachmentOffsetAngles = Angle(310, 92.002, 122);
  14. ITEM.attachmentOffsetVector = Vector(1.2, 0.2, 7);
  15.  
  16. function ITEM:GetAttachmentVisible(player, entity)
  17. return player:GetNWBool(self("uniqueID"));
  18. end;
  19.  
  20. function ITEM:OnWearAccessory(player, bIsWearing)
  21. if (bIsWearing) then
  22. Clockwork.player:CreateGear(player, self("uniqueID"), self);
  23. player:SetNWBool(self("uniqueID"), true);
  24. else
  25. local gearEntity = Clockwork.player:GetGear(player, self("uniqueID"));
  26.  
  27. if (IsValid(gearEntity)) then
  28. gearEntity:Remove();
  29. end;
  30.  
  31. player:SetNWBool(self("uniqueID"), false);
  32. end;
  33. end;
  34.  
  35. ITEM:Register();
  36.  
  37. Female armband = models/tyrex_armband/armredf.mdl
  38. Male armband = models/tyrex_armband/armredm.mdl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement