Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ITEM.Name = 'Fat Majini'
  2. ITEM.Price = 0
  3. ITEM.Model = 'Models/player/slow/amberlyn/re5/fat_majini/slow.mdl'
  4. ITEM.AllowedUserGroups = { "owner", "vip" }
  5.  
  6. function ITEM:CanPlayerBuy(ply)
  7. return team.GetName(ply:Team()) == "Survivors"
  8. end
  9.  
  10. function ITEM:CanPlayerEquip(ply)
  11. return ply:Team() == TEAM_HUMAN -- only if alive
  12. end
  13.  
  14. function ITEM:OnEquip(ply, modifications)
  15. if not ply._OldModel then
  16. ply._OldModel = ply:GetModel()
  17. end
  18. if ply:Team() == TEAM_HUMAN then
  19. timer.Simple(1, function() ply:SetModel(self.Model) end)
  20. end end
  21.  
  22. function ITEM:OnHolster(ply)
  23. if ply._OldModel and not ply:Team() == TEAM_HUMAN then
  24. ply:SetModel(ply._OldModel)
  25. end
  26. end
  27.  
  28. function ITEM:PlayerSetModel(ply)
  29. ply:SetModel(self.Model)
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement