[BUG] Can shoot weapons while in noclip if previously equipped with a weapon
txAdmin/FXServer versions: txAdmin v8.0.1 | FXServer b16276 (Ptero panel)
Describe the bug When in noclip mode, if you had a weapon equipped beforehand, you can still shoot even though it shouldn’t be allowed.
To Reproduce
Equip a weapon.
Activate noclip mode.
Try to shoot.
You will notice the character can still shoot despite being in noclip.
Expected behavior When noclip is activated, the character should not be able to shoot weapons regardless of whether a weapon was equipped before.
Screenshots (I don’t have screenshots but can provide if needed.)
Additional context This happens on a server running on Pterodactyl with FXServer version b16276.
Seems like DisablePlayerFiring() could be used, but that would need to be called every frame.
Can someone please check if there are better options?
And could someone please also test it on RedM?
diff --git a/resource/menu/client/cl_player_mode.lua b/resource/menu/client/cl_player_mode.lua
--- a/resource/menu/client/cl_player_mode.lua
+++ b/resource/menu/client/cl_player_mode.lua
@@ -165,6 +165,7 @@
Citizen.CreateThread(function()
while IsFreecamActive() do
setLocallyInvisibleFunc(ped, true)
+ DisablePlayerFiring(ped, true)
if freecamVeh > 0 then
if DoesEntityExist(freecamVeh) then
setLocallyInvisibleFunc(freecamVeh, true) -- only works for players in RedM, but to prevent errors.
A few have pointed out on discord that they like to be able to shoot while on noclip.
So I don't know about fixing this "bug".
I dont have RedM. (I have fivem)
You might be able to use: local ped = PlayerPedId() NetworkSetFriendlyFireOption(false) SetCanAttackFriendly(ped, false, false) SetPedConfigFlag(ped, 122, true)