Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user defined onchange callbacks for variables. #890

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MeMcCree
Copy link
Contributor

Callbacks are added by using cvar_set_onchangealias command (cvar_set_onchangealias ).

@tcsabina
Copy link
Collaborator

Hi @MeMcCree,

What should be the use-case for such thing?

@MeMcCree
Copy link
Contributor Author

MeMcCree commented Jan 27, 2024

Mod can set variables on client and client reacts to these changes. For example grenades in tf, on changes in grenade count edit hud elements.

@MeMcCree
Copy link
Contributor Author

MeMcCree commented Jan 29, 2024

@tcsabina, Maybe should've mentioned you.

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