Is it possible? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is it possible? (
/showthread.php?tid=635801)
Is it possible? -
DemME - 14.06.2017
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
Re: Is it possible? -
Mutha_X - 14.06.2017
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".
Re: Is it possible? -
DemME - 14.06.2017
Quote:
Originally Posted by Mutha_X
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".
|
Well, I was searching for that plugin with no success do you have a clue maybe? .. maybe my eye missed
Re: Is it possible? -
CheezIt - 14.06.2017
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.
Re: Is it possible? -
DemME - 14.06.2017
Quote:
Originally Posted by CheezIt
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 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.
|
That's what I did and had from the beginning. I was asking about what you just elbroated now in your comment, nevermind then thanks though.
Re: Is it possible? -
BigETI - 14.06.2017
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.