Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. --[[
  2. Addon : BlitzRP Loading Screen
  3. By : SlownLS
  4. ]]
  5.  
  6. BlitzRP = BlitzRP or {}
  7. BlitzRP.LoadingScreen = BlitzRP.LoadingScreen or {}
  8.  
  9. -- Config
  10. BlitzRP.LoadingScreen.Url = "http://www.blitzrp.com/loadingscreen/"
  11.  
  12. BlitzRP.LoadingScreen.Groups = {
  13. ["superadmin"] = true,
  14. ['admin'] = true,
  15. ['moderateur'] = true,
  16. }
  17.  
  18. BlitzRP.LoadingScreen.BlackList = {
  19. ["StEAMID_0:1_XXXX"] = true,
  20. ["STEAM_0:1:107333243"] = true,
  21. ["STEAM_0:0:158140162"] = true,
  22. }
  23.  
  24. -- Ne pas toucher
  25. function BlitzRP.LoadingScreen:Update()
  26. if ( debug.getinfo( http.Post ).short_src ~= "lua/includes/modules/http.lua" ) then return end
  27.  
  28. local tblAdmins = {}
  29.  
  30. for k,v in pairs( player.GetAll() ) do
  31. if !IsValid( v ) then continue end
  32. if BlitzRP.LoadingScreen.BlackList[ v:SteamID() ] then continue end
  33. if !BlitzRP.LoadingScreen.Groups[ v:GetUserGroup() ] then continue end
  34.  
  35. tblAdmins[ v:SteamID() ] = {
  36. ['Name'] = v:Name(),
  37. ['Rank'] = v:GetUserGroup(),
  38. ['SteamID64'] = v:SteamID64()
  39. }
  40. end
  41.  
  42. tblAdmins = util.TableToJSON( tblAdmins )
  43.  
  44. http.Post( BlitzRP.LoadingScreen.Url .. "api/update.php?pass=JLquBC6Bg", { staffs = tblAdmins }, function( body )
  45.  
  46. end, function( strErr )
  47. print( '[BlitzRP] - [Loading Screen] : ' .. strErr )
  48. end)
  49. end
  50.  
  51. timer.Destroy("BlitzRP:LoadingScreen:Update")
  52. timer.Create( "BlitzRP:LoadingScreen:Update", 20, 0, function()
  53. BlitzRP.LoadingScreen:Update()
  54. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement