24.12.2014, 05:30
Quote:
@ # 2 - I try to keep the amount of includes needed to a minimum, and keep it simple / straight-forward.
In regards to your next point; things like YSF can change the amount of max players; and therefore GetMaxPlayers won't return the value from the server.cfg file, - thats what this function does. And using format I thought would just be easier since I am formatting a string. Maybe I'll try using strcpy next time. NOTE: If you wish to host the GetIP page on your own host; just copy the code, and make a PHP page with said code. Then change the link in the include, and you're good to go. |
YSF changes max player value inside it's memory, I don't think changing maxplayers value on server.cfg while the process is running could change anything. If GetMaxPlayers doesn't return the value after being changed through YSF, then your function isn't useless.