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 @note in get_user_msgid() #506
Conversation
plugins/include/amxmodx.inc
Outdated
@@ -2142,6 +2142,8 @@ native random_num(a, b); | |||
* @note Example usage: get_user_msgid("TextMsg") | |||
* @note The message id is unique as long as the server is running, but might | |||
* change between updates. They should not be hardcoded into plugins. | |||
* @note This function should not be used inside plugin_precache(), as it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kind of weirdly phrased. The context should be first. My English is horrible but I would go like:
On first server start, this function returns 0 inside plugin_precache(). Consider hooking RegUserMsg in order to retrieve the message id.
Something like that with a better english if not good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arkshine Done. Btw, your English is great.
* Update lang.inc * Update lang.inc * Update amxmodx.inc * Improve @note phrasing
This function should not be used inside plugin_precache(), as it will return 0 if the server was just started.
https://forums.alliedmods.net/showthread.php?t=308592