daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Sep 13th, 2017 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AddEXP( ply, hitgroup, dmginfo )
  2.     local attacker = dmginfo:GetAttacker()
  3.     if attacker:IsPlayer() then
  4.             if attacker:IsUserGroup("VIP") then
  5.             if EXP_STOPATMAX == 1 and attacker:GetNWInt("CurLevel") == levelups[table.Count(levelups)] then return end
  6.             attacker:SetNWInt("Exp",attacker:GetNWInt("Exp")+2)
  7.             Msg("VIP exp")
  8.                 else
  9.                     if EXP_STOPATMAX == 1 and attacker:GetNWInt("CurLevel") == levelups[table.Count(levelups)] then return end
  10.                     attacker:SetNWInt("Exp",attacker:GetNWInt("Exp")+EXP_INC)
  11.                     Msg("Normal exp")
  12.         end
  13.  
  14.        
  15.         if table.HasValue(levelups,attacker:GetNWInt("Exp")) then
  16.             local leveln = 1
  17.             for k,v in ipairs(levelups) do if v == attacker:GetNWInt("Exp") then leveln = k end end
  18.             if leveln == table.Count(levelups) then PrintAll(attacker:Name().." has reached the maximum level!")
  19.             else PrintAll(attacker:GetName().." has now reached level "..leveln.."!") end
  20.             attacker:SetNWInt("NextLevel",levelups[leveln+1])
  21.             attacker:SetNWInt("CurLevel",levelups[leveln])
  22.             attacker:SetNWInt("LevelNum",leveln)
  23.             attacker:SendLua("surface.PlaySound(\"achievements/achievement_earned.mp3\")")
  24.             end
  25.            
  26.     end
  27. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top