Question regarding respect points - 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)
+--- Thread: Question regarding respect points (
/showthread.php?tid=570270)
Question regarding respect points -
bigboy81 - 06.04.2015
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..
Re: Question regarding respect points -
Sledgehammer - 06.04.2015
Код:
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