CLIENT/SERVER: fixed 'addmoney' cheat not working properly and added 'infammo' cheat#149
CLIENT/SERVER: fixed 'addmoney' cheat not working properly and added 'infammo' cheat#149motta-git wants to merge 3 commits intonzp-team:mainfrom
Conversation
There was a problem hiding this comment.
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
addmoneycommand with better input validation - New
infammotoggle 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.
|
Making a note here that I still see this, there is a way to not have to forward commands from client->server with |
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
Checklist