When is Saturday? - 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: When is Saturday? (
/showthread.php?tid=265369)
When is Saturday? -
tal_peretz - 30.06.2011
How can I check when is Saturday?
Thanks
Re: When is Saturday? -
CrazyBlob - 30.06.2011
could you explane it a little more? do you mean in REAL Time? or SA:MP Time?
Re: When is Saturday? -
Jay. - 30.06.2011
pawn Код:
new hour, minutes;
GetPlayerTime(playerid, hour, minutes);
if(hour == 13 && minutes == 37)
{
//do w/e
}
it's on the wiki , maybe thats what you meant. replace the time with saturday time..
Re: When is Saturday? -
tal_peretz - 30.06.2011
:O What?
I just want to check if today is saturday what the problam.............
Re: When is Saturday? -
BigETI - 30.06.2011
I guess you are searching for the following native:
pawn Код:
native getdate(&year=0, &month=0, &day=0);
But in this case you won't be able to check for any week day names
AW: When is Saturday? -
Nero_3D - 30.06.2011
yes use getdate and search for weekday calculations in the world wide web, there are enough different methodes to calculate the weekday
Re: When is Saturday? -
linuxthefish - 30.06.2011
Saturday is the day after tomorrow!
Use getdate.
Re: When is Saturday? -
CrazyBlob - 30.06.2011
Quote:
Originally Posted by tal_peretz
:O What?
I just want to check if today is saturday what the problam.............
|
Its Thursday Today Hope That Helps If Thats What You Wanted Lol:P
Re: When is Saturday? -
tal_peretz - 30.06.2011
you not help so much, but you gave me other idea !

thanks
Re: When is Saturday? -
Shadoww5 - 01.07.2011
PHP код:
GetWeekName(day=0, month=0, year=0)
{
new
sStr[24] = "Invalid",
iBissext = (year % 100),
iWeekDay = (year / 100);
if(month < 3) month += 12,year--;
new iWeek = ((day + (month+1)*26/10 + iBissext + iBissext/4 + iWeekDay/4 - 2*iWeekDay) % 7);
sStr =
(
(iWeek == 0x0) ? ("Saturday") :
(iWeek == 0x1) ? ("Sunday") :
(iWeek == 0x2) ? ("Morning") :
(iWeek == 0x3) ? ("Tuesday" :
(iWeek == 0x4) ? ("Wednesday") :
(iWeek == 0x5) ? ("Thursday") :
(iWeek == 0x6) ? ("Friday") : ("Invalid")
);
return sStr;
}
Credits: [iPs] Drakins