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 GetCmdArgFloat(Ex) stocks #1742

Merged
merged 3 commits into from
Apr 12, 2022
Merged

Conversation

JoinedSenses
Copy link
Contributor

Adding since there are stocks to handle int values but nothing for float.

Adding since there are stocks to handle int values but nothing for float.
@asherkin
Copy link
Member

Are float command arguments common? The int helpers were added because practically every plugin with commands would use them. Are there any cases in the base plugins that can be converted as was done with the int stocks?

@JoinedSenses
Copy link
Contributor Author

JoinedSenses commented Apr 11, 2022

Im uncertain about other people, but i use float args throughout my plugins. Quick example being development plugins for modifying ent properties. I can peek through SM base to see if there are any arg to float conversions.

@JoinedSenses
Copy link
Contributor Author

image

Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

Yeah I think this is great and makes sense, thank you!

@Mart-User
Copy link
Contributor

Yeah is useful for me as well, sometimes, as JS mentioned, I create commands in plugins to set some netprops.
As a use case, e.g. in L4D2 you can set a burning percentage from 0.0 to 1.0 to change the Special Infected appearence)
Where 0.5 means 50%, etc.

plugins/include/console.inc Outdated Show resolved Hide resolved
@asherkin asherkin merged commit 852703c into alliedmodders:master Apr 12, 2022
@JoinedSenses JoinedSenses deleted the patch-2 branch May 4, 2022 09:56
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.

None yet

4 participants