remove GetPlayerName(target)
temp fix, should get rid of any errors that occurred because of this.
This commit is contained in:
@@ -7,7 +7,7 @@ AddEventHandler('txAdmin:events:playerKicked', function(eventData)
|
|||||||
local author = eventData.author
|
local author = eventData.author
|
||||||
local reason = eventData.reason
|
local reason = eventData.reason
|
||||||
|
|
||||||
sendToDiscord('Player Kicked', "Name: **" .. GetPlayerName(target) .. "** \nAuthor: **" .. author .. "** \nReason: **" .. reason .. "**", 65280)
|
sendToDiscord('Player Kicked', "PlayerID: **" .. target .. "** \nAuthor: **" .. author .. "** \nReason: **" .. reason .. "**", 65280)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -38,8 +38,8 @@ AddEventHandler('txAdmin:events:playerBanned', function(eventData)
|
|||||||
|
|
||||||
if (type(target) == "table") then
|
if (type(target) == "table") then
|
||||||
playername = "`Offline Ban`"
|
playername = "`Offline Ban`"
|
||||||
else
|
else
|
||||||
playername = GetPlayerName(target)
|
playername = target
|
||||||
end
|
end
|
||||||
|
|
||||||
sendToDiscord('Player Banned', "Name: **" .. playername .. "** \nAuthor: **" .. author .. "** \nReason: **" .. reason .. "**\nID: **" .. id .. "**\nExpires: **" .. exp .. "**", 65280)
|
sendToDiscord('Player Banned', "Name: **" .. playername .. "** \nAuthor: **" .. author .. "** \nReason: **" .. reason .. "**\nID: **" .. id .. "**\nExpires: **" .. exp .. "**", 65280)
|
||||||
@@ -102,4 +102,4 @@ function sendToDiscord(header, message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PerformHttpRequest(webhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = connect, avatar_url = avatar}), { ['Content-Type'] = 'application/json' })
|
PerformHttpRequest(webhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = connect, avatar_url = avatar}), { ['Content-Type'] = 'application/json' })
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user