Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Examples on giving dollars for TTT
- hook.Add("DoPlayerDeath", "GiveDollars", function(p, a, d)
- if p:IsValid() and a:IsValid() then
- if p:GetTraitor() and !a:IsActiveTraitor() then -- Innocent or Dective Killed Traitor.
- if a:IsUserGroup( donator ) then
- a:ChangeDollars( AwardDollars * 2 )
- else
- a:ChangeDollars( AwardDollars )
- end
- elseif !p:GetTraitor() and a:IsActiveTraitor() then -- Traitor Killed Innocent or Dective.
- if a:IsUserGroup( donator ) then
- a:ChangeDollars( AwardDollars * 2 )
- else
- a:ChangeDollars( AwardDollars )
- end
- end
- end
- end)
- hook.Add("TTTEndRound", "AwardAlivePlayers", function( r )
- for k, v in pairs(player.GetAll()) do
- if v:Alive() and v:Team() == TEAM_TERROR then
- if v:IsUserGroup( donator ) then
- v:ChangeDollars( AwardDollars * 2 )
- v:ChatPrint( "You have been awarded $" .. AwardDollars * 2 .. " / " .. v:GetDollars() .. " dollars for playing that round." )
- else
- v:ChangeDollars( AwardDollars )
- v:ChatPrint( "You have been awarded $" .. AwardDollars .. " / " .. v:GetDollars() .. " dollars for playing that round." )
- end
- else
- v:ChangeDollars( DeadAwardDollars )
- v:ChatPrint( "You have been awarded $" .. DeadAwardDollars .. " / " .. v:GetDollars() .. " dollars for playing that round." )
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement