SA-MP Forums Archive
Redefinering? - 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: Redefinering? (/showthread.php?tid=266270)



Redefinering? - whitedragon - 04.07.2011

How to make Define like this
#define Last_UpDate "17:77"
and some function re define it how?


Re: Redefinering? - RyDeR` - 04.07.2011

Your define:
pawn Код:
#define Last_UpDate "17:77"
To redefine just use a check and undef.
pawn Код:
#if defined Last_UpDate
    #undef Last_UpDate
    #define Last_UpDate "16:77"
#endif
Will set it to 16.


Re: Redefinering? - whitedragon - 04.07.2011

Yes but i want put there Time the timer give Time there


AW: Re: Redefinering? - Nero_3D - 04.07.2011

Quote:
Originally Posted by whitedragon
Посмотреть сообщение
Yes but i want put there Time the timer give Time there
if you want to use it while running you need to use an array

pawn Код:
new Time[] = "17:77";
//in the timer
    gettime(Time[0], Time[1]); //gets the current hour and minutes
    format(Time, sizeof Time, "%02d:%02d", Time[0], Time[1]); //stroes it in Time
Hope I didnt misunderstood you ^^


Re: Redefinering? - whitedragon - 06.07.2011

Ok... I think thats fine