Advertisement
Guest User

Untitled

a guest
Jun 28th, 2021
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. -- Adaptive card
  2. card_banned = {
  3. ["type"] = "AdaptiveCard",
  4. ["$schema"] = "http =//adaptivecards.io/schemas/adaptive-card.json",
  5. ["version"] = "1.3",
  6. ["body"] = {
  7. {
  8. ["type"] = "TextBlock",
  9. ["size"] = "Medium",
  10. ["weight"] = "Bolder",
  11. ["text"] = "Banned"
  12. },
  13. {
  14. ["type"] = "Container",
  15. ["items"] = {
  16. {
  17. ["type"] = "TextBlock",
  18. ["text"] = "Expires: FAILED",
  19. ["weight"] = "Bolder",
  20. ["wrap"] = true
  21. },
  22. {
  23. ["type"] = "TextBlock",
  24. ["text"] = "Reason: FAILED",
  25. ["weight"] = "Bolder",
  26. ["wrap"] = true
  27. },
  28. {
  29. ["type"] = "TextBlock",
  30. ["text"] = "Account ID: FAILED",
  31. ["weight"] = "Bolder",
  32. ["wrap"] = true
  33. }
  34. }
  35. },
  36. {
  37. ["type"] = "TextBlock",
  38. ["text"] = "You can appeal this ban on FAILED at discord.gg/LINK",
  39. ["wrap"] = true,
  40. ["color"] = "Attention"
  41. }
  42. }
  43. }
  44.  
  45. -- Join Handler
  46. AddEventHandler("playerConnecting", function(username, setMessage, deferrals)
  47. local source = source
  48. deferrals.defer()
  49. Wait(0)
  50. -- Checks for account info not needed
  51. if banned == true then
  52. -- Database query is here that all works
  53. card_banned.body[2].items[1].text = "Expires: "..format_unixtime(banned_data[1]["unixtimestamp"])
  54. card_banned.body[2].items[2].text = "Reason: "..banned_data[1]["reason"]
  55. card_banned.body[2].items[3].text = "Account ID: "..banned_data[1]["account_id"]
  56. card_banned.body[3].text = "You can appeal this ban on "..banned_data[1]["appeal_date"].." at discord.gg/LINK"
  57. deferrals.presentCard(card_banned)
  58. return
  59. end
  60. -- rest isnt needed
  61. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement