Get last day of the week.
#1

Hello, I would like to know if there is a way in Pawn to get the last day of the week. For example now it is the 19th of March, 2018. At the end of the week it would be the 25th of March, 2018, on a Sunday. I need a function that gets me that date.

Thanks for reading, and I hope it isnt too hard to make.
Reply
#2

You could utilize the getdate function to get the last day of the week, like so:

Код:
new Year, Month, Day;

	getdate(Year, Month, Day);
	if(Month == 3 && Day == 4 || Day == 11 || Day == 18 || Day == 25) {
	//something
	}
	return 1;
Although you'd have to obviously change it for every month depending on what month it is and whatnot.

https://sampwiki.blast.hk/wiki/Getdate
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)