Advertisement
Guest User

monkeypatch_primaryattack_glua

a guest
Aug 5th, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1.  
  2. -- Some SWEP (weapon_some_swep)
  3. function SWEP.PrimaryAttack()
  4.     print("Pew Pew")
  5. end
  6.  
  7. -- Monkeypatch
  8. local some_swep = weapons.GetStored("weapon_some_swep")
  9. local original_primary = some_swep.Psome_swep.PrimaryAttack
  10. function some_swep.PrimaryAttack()
  11.     print("Getting ready to shoot...")
  12.     original_primary()
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement