Question regarding respect points
#1

I want make that players receive 2 respect points only Saturdays..
I don't have idea how i can make that.. What i need first calculate 6 days to time and make some kind of timer
who check time..
I don't known..
Reply
#2

Код:
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

You could use this include: https://sampforum.blast.hk/showthread.php?tid=437328
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)