When is Saturday?
#1

How can I check when is Saturday?

Thanks
Reply
#2

could you explane it a little more? do you mean in REAL Time? or SA:MP Time?
Reply
#3

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

:O What?

I just want to check if today is saturday what the problam.............
Reply
#5

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

yes use getdate and search for weekday calculations in the world wide web, there are enough different methodes to calculate the weekday
Reply
#7

Saturday is the day after tomorrow!

Use getdate.
Reply
#8

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

you not help so much, but you gave me other idea ! thanks
Reply
#10

PHP код:
GetWeekName(day=0month=0year=0)
{
    new
        
sStr[24] = "Invalid",
        
iBissext = (year 100),
        
iWeekDay = (year 100);
     
    if(
month 3month += 12,year--;
    new 
iWeek = ((day + (month+1)*26/10 iBissext iBissext/iWeekDay/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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)