Skip to content

fix(menu): disable weapon firing during noclip (#1061)#1106

Open
YgorLeal wants to merge 1 commit intocitizenfx:developfrom
YgorLeal:fix/noclip-weapon-firing
Open

fix(menu): disable weapon firing during noclip (#1061)#1106
YgorLeal wants to merge 1 commit intocitizenfx:developfrom
YgorLeal:fix/noclip-weapon-firing

Conversation

@YgorLeal
Copy link
Copy Markdown

@YgorLeal YgorLeal commented Apr 9, 2026

Summary

Fixes #1061 - Players can no longer fire weapons while in noclip mode.

Problem

When a player activates noclip with a weapon equipped, they could still fire the weapon. This is unintended behavior for admin freecam mode.

Solution

Added DisablePlayerFiring(playerId, true) inside the freecam loop in resource/menu/vendor/freecam/main.lua. Since the loop runs every frame (Wait(0)), this ensures firing stays disabled for the entire duration of noclip.

Testing

  1. Equip a weapon
  2. Activate noclip via txAdmin menu
  3. Try to fire → weapon should NOT fire
  4. Disable noclip
  5. Try to fire → weapon should fire normally

Changes

  • 1 file changed, 4 insertions(+)

@YgorLeal YgorLeal requested a review from tabarra as a code owner April 9, 2026 00:29
@YgorLeal YgorLeal force-pushed the fix/noclip-weapon-firing branch from 95b6564 to ce3ba9a Compare April 9, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant