Is it possible?
#1

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
Reply
#2

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".
Reply
#3

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
Reply
#4

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.
Reply
#5

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.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)