Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. hook.Add("PlayerSpawn", "Spawn", function(ply)
  2. function CommunityCheckStatus( sandboxwars, ply )
  3. if not IsValid(ply) then return end
  4. local id = util.SteamIDTo64( ply:SteamID() )
  5. http.Fetch( "http://steamcommunity.com/groups/sandboxwars" .. sandboxwars .. "/memberslistxml/?xml=1?lolwat="..os.time(),
  6. function( body, _, _, _ )
  7. if string.find( body, id ) then
  8. SetPlayerMember( ply )
  9. else
  10. print( "FALSE" )
  11. end
  12. end,
  13. function( error )
  14. print( "Something went terribly wrong!" )
  15. print( error )
  16. end
  17. )
  18. end
  19.  
  20. function CommunityCheckStatusID( sandboxwars, sid )
  21. local id = util.SteamIDTo64( sid )
  22. http.Fetch( "http://steamcommunity.com/groups/sandboxwars" .. sandboxwars .. "/memberslistxml/?xml=1?lolwat="..os.time(),
  23. function( body, _, _, _ )
  24. if string.find( body, id ) then
  25. SetPlayerMemberID( id )
  26. else
  27. print( "FALSE" )
  28. end
  29. end,
  30. function( error )
  31. print( "Something went terribly wrong!" )
  32. print( error )
  33. end
  34. )
  35. end
  36.  
  37. function SetPlayerMember( ply )
  38. if not IsValid(ply) then return end
  39. RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "member")
  40. end
  41.  
  42. function SetPlayerMemberID( id )
  43. RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "member")
  44. end
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement