Skip to content

CLIENT/SERVER: fixed 'addmoney' cheat not working properly and added 'infammo' cheat#149

Open
motta-git wants to merge 3 commits intonzp-team:mainfrom
motta-git:fix_addmoney_add_infammo_cheats
Open

CLIENT/SERVER: fixed 'addmoney' cheat not working properly and added 'infammo' cheat#149
motta-git wants to merge 3 commits intonzp-team:mainfrom
motta-git:fix_addmoney_add_infammo_cheats

Conversation

@motta-git
Copy link
Copy Markdown

@motta-git motta-git commented Dec 24, 2025

Description of Changes

As requested by the open issue 1290 (nzp-team/nzportable#1290)

i have fixed the addmoney cheat and added a new cheat called 'infammo'

the addmoney cheat had the issue that in order to be runned the user could type 'cmd addmoney 100' into the console and then because of the 'cmd' the command would work properly because it got forwarded to the server

With my code changes now when the user types 'addmoney 100' into the console that command will get forwarded to the server without the need of using 'cmd'

Also improved the addmoney command so it validates the inputed number better.

Also i created a new cheat called 'infammo' wich is a toggle that makes all weapons (including dual wield ones) to have infinite ammo.

Edit 2025-12-24 14:46:00:
the command 'spawn_pu' also had the same issue as addmoney so i just made a new commit adding it to the array of commands that get forwarded to the server


Visual Sample


image image Screenshot from 2025-12-24 14-18-36 image image image image

Checklist


  • I have thoroughly tested my changes to the best of my ability
  • I confirm I have not contributed anything that would impact Nazi Zombies: Portable's licensing and usage
  • This Pull Request fixes a critical issue that should be reviewed and merged as soon as possible

Copilot AI review requested due to automatic review settings December 24, 2025 17:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes the addmoney cheat command to work without requiring the cmd prefix and adds a new infammo cheat that provides infinite ammunition for all weapons. The changes implement automatic command forwarding from the client to the server for specified cheat commands, improving the user experience by eliminating the need to manually prefix commands with cmd.

  • Client-side command forwarding mechanism for server commands
  • Improved addmoney command with better input validation
  • New infammo toggle cheat that maintains maximum ammo for all weapons and grenades

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
source/client/main.qc Adds automatic forwarding of addmoney and infammo commands from client console to server
source/server/utilities/command_parser.qc Enhances addmoney validation and implements the new infammo toggle command
source/server/weapons/weapon_core.qc Integrates infinite ammo cheat into weapon firing logic to prevent ammo consumption and maintain full magazines
source/server/defs/custom.qc Declares the cheat_infiniteammo field for tracking infinite ammo state per player

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nzp-team nzp-team deleted a comment from Copilot AI Jan 31, 2026
@nzp-team nzp-team deleted a comment from Copilot AI Jan 31, 2026
@nzp-team nzp-team deleted a comment from Copilot AI Jan 31, 2026
@nzp-team nzp-team deleted a comment from Copilot AI Jan 31, 2026
@MotoLegacy
Copy link
Copy Markdown
Member

Making a note here that I still see this, there is a way to not have to forward commands from client->server with registercommand for portability that I will add to this as a requested change

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.

3 participants