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:
parent
2c2e8c2988
commit
bbbaf621ee
38
acf3_no_scanning/lua/acf/scanner/scanner_sh.lua
Normal file
38
acf3_no_scanning/lua/acf/scanner/scanner_sh.lua
Normal 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
|
@ -1,4 +0,0 @@
|
|||||||
hook.Add("ACF_PreBeginScanning", "edshot_acf3_noscan", function()
|
|
||||||
return false, "noob"
|
|
||||||
end)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user