Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Adaptive card
- card_banned = {
- ["type"] = "AdaptiveCard",
- ["$schema"] = "http =//adaptivecards.io/schemas/adaptive-card.json",
- ["version"] = "1.3",
- ["body"] = {
- {
- ["type"] = "TextBlock",
- ["size"] = "Medium",
- ["weight"] = "Bolder",
- ["text"] = "Banned"
- },
- {
- ["type"] = "Container",
- ["items"] = {
- {
- ["type"] = "TextBlock",
- ["text"] = "Expires: FAILED",
- ["weight"] = "Bolder",
- ["wrap"] = true
- },
- {
- ["type"] = "TextBlock",
- ["text"] = "Reason: FAILED",
- ["weight"] = "Bolder",
- ["wrap"] = true
- },
- {
- ["type"] = "TextBlock",
- ["text"] = "Account ID: FAILED",
- ["weight"] = "Bolder",
- ["wrap"] = true
- }
- }
- },
- {
- ["type"] = "TextBlock",
- ["text"] = "You can appeal this ban on FAILED at discord.gg/LINK",
- ["wrap"] = true,
- ["color"] = "Attention"
- }
- }
- }
- -- Join Handler
- AddEventHandler("playerConnecting", function(username, setMessage, deferrals)
- local source = source
- deferrals.defer()
- Wait(0)
- -- Checks for account info not needed
- if banned == true then
- -- Database query is here that all works
- card_banned.body[2].items[1].text = "Expires: "..format_unixtime(banned_data[1]["unixtimestamp"])
- card_banned.body[2].items[2].text = "Reason: "..banned_data[1]["reason"]
- card_banned.body[2].items[3].text = "Account ID: "..banned_data[1]["account_id"]
- card_banned.body[3].text = "You can appeal this ban on "..banned_data[1]["appeal_date"].." at discord.gg/LINK"
- deferrals.presentCard(card_banned)
- return
- end
- -- rest isnt needed
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement