No. You're not getting it. This is not me providing a "more efficient solution to the more patternous method." This is the only way to do it.
The way the plugin works is by regularly sending a global message, based on a time interval set by a CVAR. It does not require a user to activate the command, and thus inputs no user "id". It will occur even if there are no users in the server.
What you did in your code was change the variable name from "i" to "id". Either one would work. Most coders use "i" in a loop because it is an increasing variable and not the same type of variable as your typical "id".
And yeah, you can use get_maxplayers() instead. I was just giving you an example.