Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Addon : BlitzRP Loading Screen
- By : SlownLS
- ]]
- BlitzRP = BlitzRP or {}
- BlitzRP.LoadingScreen = BlitzRP.LoadingScreen or {}
- -- Config
- BlitzRP.LoadingScreen.Url = "http://www.blitzrp.com/loadingscreen/"
- BlitzRP.LoadingScreen.Groups = {
- ["superadmin"] = true,
- ['admin'] = true,
- ['moderateur'] = true,
- }
- BlitzRP.LoadingScreen.BlackList = {
- ["StEAMID_0:1_XXXX"] = true,
- ["STEAM_0:1:107333243"] = true,
- ["STEAM_0:0:158140162"] = true,
- }
- -- Ne pas toucher
- function BlitzRP.LoadingScreen:Update()
- if ( debug.getinfo( http.Post ).short_src ~= "lua/includes/modules/http.lua" ) then return end
- local tblAdmins = {}
- for k,v in pairs( player.GetAll() ) do
- if !IsValid( v ) then continue end
- if BlitzRP.LoadingScreen.BlackList[ v:SteamID() ] then continue end
- if !BlitzRP.LoadingScreen.Groups[ v:GetUserGroup() ] then continue end
- tblAdmins[ v:SteamID() ] = {
- ['Name'] = v:Name(),
- ['Rank'] = v:GetUserGroup(),
- ['SteamID64'] = v:SteamID64()
- }
- end
- tblAdmins = util.TableToJSON( tblAdmins )
- http.Post( BlitzRP.LoadingScreen.Url .. "api/update.php?pass=JLquBC6Bg", { staffs = tblAdmins }, function( body )
- end, function( strErr )
- print( '[BlitzRP] - [Loading Screen] : ' .. strErr )
- end)
- end
- timer.Destroy("BlitzRP:LoadingScreen:Update")
- timer.Create( "BlitzRP:LoadingScreen:Update", 20, 0, function()
- BlitzRP.LoadingScreen:Update()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement