Posts: 294
Threads: 80
Joined: Oct 2013
Reputation:
0
Is it possible to count that every compile or server up times so it will count as restart by the script and to print it in the version in "Mode" line of SA:MP if yes, how to do so? (so every restart I do within the server is an update
Posts: 658
Threads: 3
Joined: Sep 2009
Reputation:
0
You can count how many times your gamemode.amx changed value of "last modification time" (use special plugin for it) comparing it with the last value it's value of server start up. That will be ~ "Build Number".
Posts: 175
Threads: 1
Joined: Apr 2017
Reputation:
0
14.06.2017, 07:04
(
Последний раз редактировалось CheezIt; 14.06.2017 в 20:12.
)
What you're trying to do won't be accurate at the slightest, unless you're an absolute god; you don't make mistakes (produce bugs basically) and you don't need to change anything (this requires recompiling the script and restarting the server), which is highly unlikely for pretty much everyone (I include myself in this list).
Just set a #define in your script, set the build/version of the script there and make it show in the mode text of the server.
Posts: 1,046
Threads: 29
Joined: Mar 2010
You can create a shell script to create/modify a file that is going to increment its content when it successfully compiled your source code. You could use that file as your gamemode's build number.