Jump to content

Recommended Posts

Posted (edited)

Hello dear community, today i made the decision to share with you my AIM LOGS for your discord server.

 

The Aim Logs is when someone target another player with weapon or mele, my script print it in your discord webhook with full details.

 

1. First you need to Download JD_Logs v1.

2. Open from logs resource the file server.lua and find this Function!

Citizen.CreateThread(function()

	while true do
		Citizen.Wait(0)
		local playerped = GetPlayerPed(-1)

		if IsPedShooting(playerped) then
			TriggerServerEvent('playerShotWeapon', WeaponNames[tostring(GetSelectedPedWeapon(playerped))])
			Citizen.Wait(5000)
		end
	end

end)

 

3. Now Replace it with my code!

Citizen.CreateThread(function()

	while true do
		Citizen.Wait(0)
		local playerped = GetPlayerPed(-1)

		if IsPedShooting(playerped) then
			TriggerServerEvent('playerShotWeapon', WeaponNames[tostring(GetSelectedPedWeapon(playerped))])
			Citizen.Wait(5000)
		end
		if GetEntityPlayerIsFreeAimingAt(PlayerId(PlayerId)) then
			local retval, target = GetEntityPlayerIsFreeAimingAt(PlayerId())
			local targetPlayer = retval and NetworkGetPlayerIndexFromPed(target)
			local targetSource = targetPlayer and GetPlayerServerId(targetPlayer)
            TriggerServerEvent('playerAiming', targetSource, WeaponNames[tostring(GetSelectedPedWeapon(playerped))])
            Citizen.Wait(5000)
        end
	end

end)

 

4. Open open the file client.lua and paste my code!

RegisterServerEvent('playerAiming')
AddEventHandler('playerAiming', function(targetPlayer, weapon)
    local ids = ExtractIdentifiers(source)
	local postal = getPlayerLocation(source)
	local playerName = GetPlayerName(source)
	local targetIdentifiers = ExtractIdentifiers(targetPlayer)
	local targetName = GetPlayerName(targetPlayer)
	
	if Config.steamURL then if targetIdentifiers.steam ~= "" then _targetSteamURL ="\nhttps://steamcommunity.com/profiles/" ..tonumber(targetIdentifiers.steam:gsub("steam:", ""),16).."" else _targetSteamURL = "\nSteam URL: N/A" end else _targetIdentifiers = "" end
	if Config.aiming then _targetName = "\n**To Steam Name Του Στόχου:** ".. targetName .." " else _targetName = "" end
	if Config.steamID then if targetIdentifiers.steam ~= "" then _targetIdentifiers ="\n**To Steam ID Του Στόχου:** " ..targetIdentifiers.steam.."" else _targetIdentifiers = "\n**To Steam ID:** N/A" end else _targetIdentifiers = "" end
	if Config.aiming then _targetPlayer ="\n**To Α.Φ.Μ Του Στόχου:** " .. targetPlayer .."" else _targetPlayer = "" end
	if Config.aiming then if targetIdentifiers.license ~= "" then _targetLicense ="\n**To RockStar ID Του Στόχου:** " ..targetIdentifiers.license.."" else _targetLicense = "\n**To License ID :** N/A" end else _targetLicense = "" end
    if Config.discordID then if targetIdentifiers.discord ~= "" then _targetDiscord ="\n**To Discord ID Του Στόχου:** <@" ..targetIdentifiers.discord:gsub("discord:", "")..">" else _targetDiscord = "\n**Discord ID:** N/A" end else _targetDiscord = "" end
	if Config.postal then _postal = "\n**Nearest Postal:** ".. postal .."" else _postal = "" end
    if Config.discordID then if ids.discord ~= "" then _discordID ="\n**Το Discord ID Του Yπαίτιου:** <@" ..ids.discord:gsub("discord:", "")..">" else _discordID = "\n**Το Discord ID Του Yπαίτιου:** N/A" end else _discordID = "" end
	if Config.steamID then if ids.steam ~= "" then _steamID ="\n**Το Steam ID Του Yπαίτιου:** " ..ids.steam.."" else _steamID = "\n**Το Steam ID Του Yπαίτιου:** N/A" end else _steamID = "" end
	if Config.aiming then _playerName = "\n**Το Steam Name Του Yπαίτιου:** ".. playerName .." " else _playerName = "" end
	if Config.aiming then if ids.license ~= "" then _playerLicense ="\n**Το RockStar ID Του Yπαίτιου:** " ..ids.license.."" else _playerLicense = "\n**Το License ID Του Yπαίτιου:** N/A" end else _playerLicense = "" end
    if Config.steamURL then if ids.steam ~= "" then _steamURL ="\nhttps://steamcommunity.com/profiles/" ..tonumber(ids.steam:gsub("steam:", ""),16).."" else _steamURL = "\nSteam URL:** N/A" end else _steamID = "" end
	if Config.playerID then _playerID ="\n**Το Α.Φ.Μ Του Yπαίτιου :** " ..source.."" else _playerID = "" end
    if Config.weaponLog then
        discordLog('**O/H ' .. sanitize(GetPlayerName(source))  .. ' Σημάδεψε με ' ..weapon.. ' **' .. _targetName .. '' .. _targetPlayer .. ''.. _targetIdentifiers .. '' .. _targetSteamURL ..'' .. _targetDiscord .. ''.. _targetLicense .. '' .. _postal ..'' .. _playerName ..  '' .. _playerID .. ''.. _steamID ..'' .. _steamURL .. ''.. _discordID ..'' .. _playerLicense ..  '', Config.shootingColor, 'aiming')
    end
end)

 

5. Open the file config.lua and paste this line!

Config.aiming = true

 

P.S The details are writen in Greeks you must translate it!

 

 

Edited by Dragic
  • Upvote 1
  • Dragic changed the title to FiveM Discord Aim Logs

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...