Guest User

Untitled

a guest
Jul 25th, 2014
3,721
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ITEM.Name = 'Player Paint'
  2. ITEM.Price = 0
  3. ITEM.Model = 'models/props_junk/metal_paintcan001a.mdl'
  4. ITEM.Attachment = 'eyes'
  5. ITEM.AllowedUserGroups = { "superadmin", "admin", "vip" }
  6.  
  7.  
  8. function ITEM:OnEquip(ply, modifications)
  9.    
  10.     if modifications.color ~= nil then
  11.         newcolor = modifications.color
  12.     ply:SetPlayerColor(Vector( newcolor.r / 255, newcolor.g / 255, newcolor.b / 255))
  13.     end
  14. end
  15.  
  16. function ITEM:OnHolster(ply)
  17.     local colDefault = Color(255,255,255,255)
  18.     ply:SetColor(colDefault)
  19. end
  20.  
  21. function ITEM:Modify(modifications)
  22.         PS:ShowColorChooser(self, modifications)
  23. end
  24.  
  25. function ITEM:OnModify(ply, modifications)
  26.     self:OnHolster(ply)
  27.     self:OnEquip(ply, modifications) end
RAW Paste Data