Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. function ITEM:OnBuy(ply)
  2. ply:Give(self.WeaponClass)
  3. ply:SelectWeapon(self.WeaponClass)
  4. hook.Add("TTTBeginRound", "DoesPlayerHaveCrowbar", function(ply)
  5. timer.Create( "PlayerKnife", 1, 1, function()
  6. for k, v in pairs(player.GetAll(ply)) do
  7. if v:HasWeapon("weapon_zm_improvised") then
  8. v:StripWeapon("weapon_zm_improvised")
  9. end
  10. end
  11. end)
  12. end)
  13. end
  14.  
  15. function ITEM:OnEquip(ply)
  16. ply:Give(self.WeaponClass)
  17. ply:SelectWeapon(self.WeaponClass)
  18. hook.Add("TTTBeginRound", "DoesPlayerHaveCrowbar", function(ply)
  19. timer.Create( "PlayerKnife", 1, 1, function()
  20. for k, v in pairs(player.GetAll(ply)) do
  21. if v:HasWeapon("weapon_zm_improvised") then
  22. v:StripWeapon("weapon_zm_improvised")
  23. end
  24. end
  25. end)
  26. end)
  27. end
  28.  
  29. function ITEM:OnHolster(ply, modifications)
  30. ply:StripWeapon(self.WeaponClass)
  31. timer.Destroy( "PlayerKnife" )
  32. end
  33.  
  34. function ITEM:OnSell(ply)
  35. ply:StripWeapon(self.WeaponClass)
  36. timer.Destroy( "PlayerKnife" )
  37. end
  38.  
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement