Skip to content

feat: Added damage cash for human side. - #367

Merged
Vauff merged 4 commits into
Source2ZE:mainfrom
oylsister:cash-damage
Jul 24, 2025
Merged

feat: Added damage cash for human side.#367
Vauff merged 4 commits into
Source2ZE:mainfrom
oylsister:cash-damage

Conversation

@oylsister

Copy link
Copy Markdown
Contributor

as the title said, I know GFL doesn't need it, but this is simply added for old Zombie:Reloaded feature that allow player to earn money from damaging zombie.

@oylsister

Copy link
Copy Markdown
Contributor Author

Test on linux working fine.

@Vauff Vauff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should offer more flexibility with the convar, by using it as a scale for money given, e.g. set as zr_damage_cash_scale 1.0, then calculate money to give with zr_damage_cash_scale * damage.

This should also be disabled by default in the .cfg (can check for value of 0.0 to act as a disable).

@oylsister

Copy link
Copy Markdown
Contributor Author

That will do

@oylsister
oylsister requested a review from Vauff July 21, 2025 01:58
@Vauff
Vauff enabled auto-merge (squash) July 24, 2025 04:32
@Vauff
Vauff merged commit e1a7aeb into Source2ZE:main Jul 24, 2025
3 checks passed
@oylsister

Copy link
Copy Markdown
Contributor Author

@Vauff I knew that this already get merged, but if some server set this convar to 0.001 instead of normal human being number, do we suppose to make it minimum earning money to 1 or just leave it like that?

@Vauff

Vauff commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

@Vauff I knew that this already get merged, but if some server set this convar to 0.001 instead of normal human being number, do we suppose to make it minimum earning money to 1 or just leave it like that?

I can't imagine such low values are really a valid use case. However if you think they are, it'd probably be better to store the <1 decimal value(s) in plugin, until enough damage is done to reach 1, and only then add $1 to the players money. But this is probably overkill unless desired by someone.

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.

2 participants