Skip to content

Add GetCmdArgFloat(Ex) stocks#1742

Merged
asherkin merged 3 commits intoalliedmodders:masterfrom
JoinedSenses:patch-2
Apr 12, 2022
Merged

Add GetCmdArgFloat(Ex) stocks#1742
asherkin merged 3 commits intoalliedmodders:masterfrom
JoinedSenses:patch-2

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.

@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.

4 participants