CapsAdmin

Untitled

Nov 8th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local blacklist =
  2. {
  3.     korea = true,
  4.     norway = true,
  5. }
  6.  
  7. local function OnPlayerSpawned(ply)
  8.     http.Fetch("http://freegeoip.net/json/" .. ply:IPAddress():match("(.-):"), function(data)
  9.        
  10.         data = util.JSONToTable(data)
  11.        
  12.         if blacklist[data.country_name:lower()] then
  13.             ply:Kill()
  14.         end
  15.        
  16.     end)
  17. end
  18.  
  19. OnPlayerSpawned(yomo)
Advertisement
Add Comment
Please, Sign In to add comment