SA-MP Forums Archive
version script - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: version script (/showthread.php?tid=214153)



version script - Face9000 - 20.01.2011

Hi all,i need to make a version of script.

I explain better:

i will write the version of script (ex: 1.0) in a define/string and when i wanna read as like cmd /version,i will do

Version of script: VERSION DEFINED.

Thanks


Re: version script - Mikkel_Pedersen - 20.01.2011

Do you mean like this? If I got it wrong, then sorry :/
pawn Код:
#include <a_samp>
#include <zcmd>
#define VERSION 1.0
CMD:version(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Version of script: "#VERSION"");
    return 1;
}



Re: version script - Face9000 - 20.01.2011

Yeah,thanks.


Re: version script - Mike Garber - 20.01.2011

Quote:
Originally Posted by Mikkel_Pedersen
Посмотреть сообщение
Do you mean like this? If I got it wrong, then sorry :/
pawn Код:
#include <a_samp>
#include <zcmd>
#define VERSION 1.0
CMD:version(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, "Version of script: "#VERSION"");
    return 1;
}
Don't force zcmd on people, others are doing it aswell and It's like everyone that release something would force strtok on you.

pawn Код:
#define VERSION "V1.0"

// And call it with VERSION. Example;
SendClientMessage(playerid, COLOR, VERSION);