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 @note in get_user_msgid() #506

Merged
merged 7 commits into from
Aug 20, 2018
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/include/amxmodx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

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.

Copy link
Contributor Author

@OciXCrom OciXCrom Aug 9, 2018

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.

* will return 0 if the server was just started.
*
* @param name Client message name
*
Expand Down