replace hook with stub to disable the acf3 scanner

scanner hook.Run() call doesnt work reliably for me and id rather just remove/disable all the original code anyways
This commit is contained in:
edshot99 2024-09-30 13:54:08 -05:00
parent 2c2e8c2988
commit bbbaf621ee
2 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,38 @@
print("> Loading scanner stub...")
local ACF = ACF
local scanning = {}
ACF.Scanning = scanning
local whyNot = "<no reason provided>"
if SERVER then
util.AddNetworkString("ACF_Scanning_PlayerListChanged")
hook.Add("PlayerInitialSpawn", "ACF_Scanning_PlayerInitialSpawn", function()
net.Start("ACF_Scanning_PlayerListChanged")
net.Broadcast()
end)
hook.Add("PlayerDisconnected", "ACF_Scanning_PlayerDisconnected", function()
net.Start("ACF_Scanning_PlayerListChanged")
net.Broadcast()
end)
function scanning.BeginScanning(playerScanning, targetPlayer)
return
end
end
if CLIENT then
function scanning.BeginScanning(target)
if (LocalPlayer():InVehicle()) then
Derma_Message("You cannot scan a target while being in a vehicle. Exit the vehicle, then try again.", "Scanning Blocked", "OK")
else
Derma_Message("Scanning has been blocked by the server: " .. whyNot, "Scanning Blocked", "OK")
end
return
end
end

View File

@ -1,4 +0,0 @@
hook.Add("ACF_PreBeginScanning", "edshot_acf3_noscan", function()
return false, "noob"
end)