Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | None | 0 0
  1. unction ENT:Think()
  2.     if ( string.find( string.lower( game.GetMap() ), "bhop_eazy" ) )        then    test = 1000
  3. elseif ( string.find( string.lower( game.GetMap() ), "bhop_eazy_v2" ) )     then    test = 2000
  4. elseif ( string.find( string.lower( game.GetMap() ), "bhop_cobblestone" ) ) then    test = 3000
  5. elseif ( string.find( string.lower( game.GetMap() ), "bhop_eazy" ) )        then    test = 4000
  6. elseif ( string.find( string.lower( game.GetMap() ), "bhop_eazy" ) )        then    test = 5000
  7. elseif ( string.find( string.lower( game.GetMap() ), "bhop_eazy" ) )        then    test = 6000
  8. else test = 1
  9. end
  10.  
  11.     for _,ply in pairs(player.GetAll()) do
  12.         if(ply:Team() == TEAM_SPECTATOR) then continue end
  13.         if (ply:GetPos() + ply:GetUp()*40):Distance(self.Entity:GetPos()) <= 96 then
  14.             if not self:PlayerTouched(ply) then
  15.                 if(self.Reward == nil) then return end
  16.  
  17.                 local lastDiff = self.Diffs[ply:UniqueID()]
  18.                 local reward = 0
  19.                 if(lastDiff == nil or lastDiff == 0) then
  20.                     reward = self.Reward*test*self:GetMultiplier(ply:Team())
  21.                     self.Diffs[ply:UniqueID()] = ply:Team()
  22.                 else
  23.                     if(ply:Team() > lastDiff) then
  24.                         reward = (self.Reward*self:GetMultiplier(ply:Team()))-(self.Reward*self:GetMultiplier(lastDiff))
  25.                         self.Diffs[ply:UniqueID()] = ply:Team()
  26.                     end
  27.                 end
  28.                
  29.                 if(reward > 0) then ply:PS_GivePoints(reward) end
  30.                 self:SendNotification(ply, reward)
  31.                 table.insert(self.Touched,ply:SteamID())
  32.             end
  33.         end
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement