local logs = "https://discord.com/api/webhooks/1512887370767138886/j3MHhsleA3GMnYcKI8k8rMrjLL-lYwkm0ylHW16EntpXWDrmb5ryhdEaSv5qNNs_mW87" local communityname = "Big Yoda" local communtiylogo = "https://i.imgur.com/e8VsdLL.jpg" --Must end with .png or .jpg AddEventHandler('playerConnecting', function() local name = GetPlayerName(source) local ip = GetPlayerEndpoint(source) local ping = GetPlayerPing(source) local steamhex = GetPlayerIdentifier(source) local connect = { { ["color"] = "8663711", ["title"] = "Player Connected to Server #1", ["description"] = "Player: **"..name.."**\nIP: **"..ip.."**\n Steam Hex: **"..steamhex.."**", ["footer"] = { ["text"] = communityname, ["icon_url"] = communtiylogo, }, } } PerformHttpRequest(logs, function(err, text, headers) end, 'POST', json.encode({username = "Big Yoda Server Logger", embeds = connect}), { ['Content-Type'] = 'application/json' }) end) AddEventHandler('playerDropped', function(reason) local name = GetPlayerName(source) local ip = GetPlayerEndpoint(source) local ping = GetPlayerPing(source) local steamhex = GetPlayerIdentifier(source) local disconnect = { { ["color"] = "8663711", ["title"] = "Player Disconnected from Server #1", ["description"] = "Player: **"..name.."** \nReason: **"..reason.."**\nIP: **"..ip.."**\n Steam Hex: **"..steamhex.."**", ["footer"] = { ["text"] = communityname, ["icon_url"] = communtiylogo, }, } } PerformHttpRequest(logs, function(err, text, headers) end, 'POST', json.encode({username = "Big Yoda Server Logger", embeds = disconnect}), { ['Content-Type'] = 'application/json' }) end)