├── README.md ├── client.lua ├── config.lua ├── fxmanifest.lua └── server.lua /README.md: -------------------------------------------------------------------------------- 1 | # ax_antisilentaim 2 | ## FiveM Anti Silent Aim - Detects modified x64a.rpf-gamefiles (usually used for silent aim/stretching the hitbox of peds) and kick them from the server 3 | ## ESX/QBcore 4 | 5 | ### Features 6 | - Discord Logs 7 | - Bypass for user group admin, mod and sup (changeable) *(ONLY ESX)* 8 | - Kick after detection 9 | 10 | ### What is silent aim? 11 | [YouTube Showcase - What is silent aim?](https://www.youtube.com/watch?v=UC0rSc6ykng) 12 | To prevent this on your server, download this resource, 13 | set up your webhooks in the server.lua and stay protected from this sort of bs. 14 | 15 | ## Contributors 16 | Special thanks to the following people, for contributing and improving this project! 17 | - [cqmpact](https://github.com/cqmpact) 18 | - [SeaLife](https://forum.cfx.re/u/sealife/summary) 19 | 20 | ## deprecation notice/keep in mind: 21 | - there have been released some new x64a.rpf files, which is not detected by this script. 22 | - mostly people still use the "old" x64a.rpf-streching files, which is indeed detected by this script. 23 | -------------------------------------------------------------------------------- /client.lua: -------------------------------------------------------------------------------- 1 | CreateThread(function() 2 | while true do 3 | Wait(10000) 4 | local model = GetEntityModel(PlayerPedId()) 5 | local min, max = GetModelDimensions(model) 6 | if min.y < -0.29 or max.z > 0.98 then 7 | TriggerServerEvent("antiaim:log") 8 | end 9 | end 10 | end) -------------------------------------------------------------------------------- /config.lua: -------------------------------------------------------------------------------- 1 | Config = {} 2 | Config.Framework = 'qb' -- Framework: qb or esx 3 | Config.Avatar = 'https://via.placeholder.com/200x200' 4 | Config.DropStaff = true -- Drop staff if they are using modified RPF files 5 | Config.PlayerAcePermission = '' -- set a ACE permission to check for 6 | -------------------------------------------------------------------------------- /fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'cerulean' 2 | game 'gta5' 3 | 4 | description '[AntiAim] Anti silent aim. Kick players who use modified RPF files. https://forum.cfx.re/t/esx-standalone-free-anti-silent-aim-ax-antisilentaim/4960946' 5 | version '1.0.0' 6 | author 'ardo | modified by Matt.#0666' 7 | 8 | 9 | 10 | client_script 'client.lua' 11 | server_scripts { 12 | 'config.lua', 13 | 'server.lua' 14 | } -------------------------------------------------------------------------------- /server.lua: -------------------------------------------------------------------------------- 1 | local QBCore = nil 2 | local ESX = nil 3 | local Webhook = '' -- insert your webhook in here 4 | 5 | 6 | if Webhook == '' then 7 | print('^1[AntiAim] ^1Please set your discord bot Webhook in config.lua ^7') 8 | return 9 | end 10 | 11 | if Config.Framework == '' then 12 | print('^1[AntiAim] ^1Please set your framework in config.lua ^7') 13 | return 14 | end 15 | 16 | if Config.Framework == 'qb' then 17 | QBCore = exports['qb-core']:GetCoreObject() 18 | while QBCore == nil do 19 | Citizen.Wait(200) 20 | end 21 | elseif Config.Framework == 'esx' then 22 | TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) 23 | while ESX == nil do 24 | Citizen.Wait(200) 25 | end 26 | end 27 | 28 | 29 | local function logEvent(source) 30 | local src = source 31 | local license = GetPlayerIdentifier(src) 32 | local steamname = GetPlayerName(src) 33 | local playerTrust = false 34 | 35 | -- Player data 36 | if Config.Framework == 'qb' then 37 | if QBCore.Functions.HasPermission(src, 'god') or QBCore.Functions.HasPermission(src, 'admin') or QBCore.Functions.HasPermission(src, 'mod') then 38 | playerTrust = true 39 | end 40 | elseif Config.Framework == 'esx' then 41 | if ESX.GetPlayerFromId(src).getGroup() == 'admin' or ESX.GetPlayerFromId(src).getGroup() == 'mod' then 42 | playerTrust = true 43 | end 44 | end 45 | 46 | if Config.PlayerAcePermission and string.len(Config.PlayerAcePermission) > 0 and IsPlayerAceAllowed(src, Config.PlayerAcePermission) then 47 | playerTrust = true 48 | end 49 | 50 | -- If player is not trusted, kick them and send a log to the discord 51 | if not playerTrust then 52 | -- 1st we create the embed, this is a JSON object 53 | local embedData = { 54 | { 55 | ['title'] = '[ANTI-AIM] Modified RPF files detected', 56 | ['color'] = 16711680, 57 | ['footer'] = { 58 | ['text'] = os.date('%c'), 59 | }, 60 | ['description'] = 'Player: ' .. steamname .. '\nLicense: ' .. license .. '\nSteamID: ' .. GetPlayerIdentifier(src, 1) .. '\nIP: ||' .. GetPlayerEndpoint(src) .. '||', 61 | ['author'] = { 62 | ['name'] = '[ANTI-AIM]', 63 | ['icon_url'] = Config.Avatar, 64 | }, 65 | } 66 | } 67 | PerformHttpRequest(Webhook, function() end, 'POST', json.encode({ username = '[ANTI-AIM]', embeds = embedData}), { ['Content-Type'] = 'application/json' }) 68 | if not Config.DropStaff then 69 | print('^1[AntiAim] ^1STAFF USING MODIFIED RPF FILES: ' .. steamname .. ' ^7') 70 | return 71 | end 72 | print('^1[AntiAim] ^1Player ' .. steamname .. ' has been kicked for using modified RPF files. ^7') 73 | DropPlayer(src, 'You have been kicked for using modified RPF files.') 74 | end 75 | end 76 | 77 | 78 | RegisterNetEvent('antiaim:log', function() 79 | if QBCore == nil and ESX == nil then 80 | print('^1[AntiAim] ^3Framework not found. Please check your config.lua ^7') 81 | return 82 | end 83 | local src = source 84 | logEvent(src) 85 | end) 86 | 87 | -- Test command, use this to test if the webhook is working 88 | --RegisterCommand('tWebhook', function(source, args) 89 | -- local src = source 90 | -- logEvent(src) 91 | --end) 92 | --------------------------------------------------------------------------------