#6

you can use it by this way I think its better and easer to read...
PHP Code:
enum EventInfo
{
  
EvName[35],
  
Day,
  
Month,
}
new 
Events[][EventInfo] = {
 {
"New Year's Day"11}, // You can add more "Events Text", "Day", "Month"
 
{"Martin Luther King Day"81},
 {
"Valentine's Day"142},
 {
"Presidents's Day"152},
 {
"Easter Sunday"327},
 {
"Thomas Jefferson's Birthday"134},
 {
"Mother's Day"85},
 {
"Memorial Day"305},
 {
"Father's Day"166},
 {
"Independence Day"47},
 {
"Labor Day"59},
 {
"Columbos Day"1010},
 {
"Halloween"3110},
 {
"Election Day"811},
 {
"Veterans Day"1111},
 {
"Christmas Eve"2412},
 {
"Christmas Day"2512},
 {
"Christmas Day Observed"2612},
 {
"New Year's Eve"3112}
};
forward LoadEvents();
public 
LoadEvents()
{
   new 
daymonthyear;
   
getdate(daymonthyear);
   for(new 
0sizeof Eventsi++)
   {
      if(
day == Events[i][Day] && month == Events[i][Month]){
         new 
string[80];
         
format(stringsizeof(string), "[BOT]: Happy %s (%02d/%02d)"Events[i][EvName], GetDay(day,month), GetMonth(month));
         
SendClientMessageToAll(-1string);
      }
      break;
   }
   return 
1;

Edit: Thanks Stinged, fixed.
Reply


Messages In This Thread
Help - by Zorono - 04.08.2016, 15:51
Re: Help - by SyS - 04.08.2016, 15:52
Re: Help - by Zorono - 04.08.2016, 15:53
Re: Help - by WhiteGhost - 04.08.2016, 16:04
Re: Help - by Zorono - 04.08.2016, 16:14
Re: Help - by jlalt - 04.08.2016, 16:18
Re: Help - by Stinged - 04.08.2016, 16:20
Re: Help - by Zorono - 04.08.2016, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)