Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. -- This is the one that just does the job:
  2.  
  3. local function deathChat( ply, txt, teamChat, isDead)
  4. if ply:IsPlayer() and isDead == true then
  5. return(true)
  6. end
  7. end
  8.  
  9. hook.Add ("OnPlayerChat", "jameZtheDeadCantTalk", deathChat)
  10.  
  11. ------------------------------
  12.  
  13. -- This is the one that I'm trying to add to:
  14.  
  15. local function deathChat( ply, txt, teamChat, isDead)
  16. if ply:IsPlayer() and isDead == true then
  17. return(true)
  18.  
  19. end
  20.  
  21. end
  22.  
  23. local function wtf ()
  24. PrintMessage( HUD_PRINTTALK, "Shhh Now! The Dead Can't Talk" )
  25. end
  26.  
  27. hook.Add ("OnPlayerChat", "jameZtheDeadCantTalk", deathChat)
  28. hook.Add ("OnPlayerChat", "jameZtheDeadCantTalk", wtf)
  29.  
  30. -- This shows that the PrintMessage function actually works (on a separate hook):
  31.  
  32. local function wtf ()
  33. PrintMessage( HUD_PRINTTALK, "Shhh Now! The Dead Can't Talk" )
  34. end
  35.  
  36. hook.Add ("OnPlayerHitGround", "sdsd", wtf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement