Advertisement
clark

Untitled

Jan 29th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1.  
  2. // Examples on giving dollars for TTT
  3.  
  4. hook.Add("DoPlayerDeath", "GiveDollars", function(p, a, d)
  5. if p:IsValid() and a:IsValid() then
  6. if p:GetTraitor() and !a:IsActiveTraitor() then -- Innocent or Dective Killed Traitor.
  7. if a:IsUserGroup( donator ) then
  8. a:ChangeDollars( AwardDollars * 2 )
  9. else
  10. a:ChangeDollars( AwardDollars )
  11. end
  12. elseif !p:GetTraitor() and a:IsActiveTraitor() then -- Traitor Killed Innocent or Dective.
  13. if a:IsUserGroup( donator ) then
  14. a:ChangeDollars( AwardDollars * 2 )
  15. else
  16. a:ChangeDollars( AwardDollars )
  17. end
  18. end
  19. end
  20. end)
  21.  
  22. hook.Add("TTTEndRound", "AwardAlivePlayers", function( r )
  23. for k, v in pairs(player.GetAll()) do
  24. if v:Alive() and v:Team() == TEAM_TERROR then
  25. if v:IsUserGroup( donator ) then
  26. v:ChangeDollars( AwardDollars * 2 )
  27. v:ChatPrint( "You have been awarded $" .. AwardDollars * 2 .. " / " .. v:GetDollars() .. " dollars for playing that round." )
  28. else
  29. v:ChangeDollars( AwardDollars )
  30. v:ChatPrint( "You have been awarded $" .. AwardDollars .. " / " .. v:GetDollars() .. " dollars for playing that round." )
  31. end
  32. else
  33. v:ChangeDollars( DeadAwardDollars )
  34. v:ChatPrint( "You have been awarded $" .. DeadAwardDollars .. " / " .. v:GetDollars() .. " dollars for playing that round." )
  35. end
  36. end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement