Cactus

DeathRun - Give Pointshop points on round end

Jul 29th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. if SERVER then
  2.     hook.Add( "OnRoundSet", "DR Money", function( round, winner )
  3.         if round == ROUND_ENDING then
  4.             for _, ply in ipairs( player.GetAll() ) do
  5.                 if ply:Team() == winner then -- Check if the player's team is the same as the winning team 
  6.                     ply:PS_GivePoints( 10 ) -- Gives the points if the player is on the winning team
  7.                 end
  8.             end
  9.         end
  10.     end )
  11. end
Advertisement
Add Comment
Please, Sign In to add comment