Share Pastebin
Guest
Public paste!

Seth

By: a guest | Mar 20th, 2010 | Syntax: None | Size: 0.79 KB | Hits: 74 | Expires: Never
Copy text to clipboard
  1.  
  2. PopCorn -SDB-: as i am a Very good Lua coder
  3. PopCorn -SDB-: all types
  4. 'Seth: do you know what pcall does
  5. PopCorn -SDB-: why
  6. PopCorn -SDB-: what do you need
  7. PopCorn -SDB-: i can code alot of things
  8. 'Seth: do you know what a hook is?
  9. PopCorn -SDB-: yes
  10. PopCorn -SDB-: thsi can be classed as a hook
  11. PopCorn -SDB-: function sayThatName(victim,inflictor,killer) //Use the same arguments as the original function you're hooking to
  12. victim:PrintMessage(HUD_PRINTTALK,killer:Nick().." killed you!\n")
  13. end
  14. hook.Add("PlayerDeath","informTheVictims",sayThatName)
  15. 'Seth: did you just make that?
  16. 'Seth: awesome code
  17. PopCorn -SDB-: :p
  18. PopCorn -SDB-: i did tell you i can code
  19. PopCorn -SDB-: It tells victims who killed them in chat
  20. PopCorn -SDB-: quite usefull
  21. PopCorn -SDB-: took me 5 mins to make