Stefantjuh97

Untitled

Dec 6th, 2012
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.25 KB | None | 0 0
  1. command(checkinactivehouses, playerid, params[])
  2. {
  3.     new string[128], Date[128], Day, Month, Year, HDay, HMonth, HYear;
  4.     if(sscanf(params, "ddd", Day, Month, Year))
  5.     {
  6.         if(Player[playerid][AdminLevel] >= 6)
  7.         {
  8.             SendClientMessage(playerid, WHITE, "SYNTAX: /checkinactivehouses [day] [month] [year]");
  9.         }
  10.     }
  11.     else
  12.     {
  13.         if(Player[playerid][AdminLevel] >= 6)
  14.         {
  15.             SCM(playerid, COLOR_ORANGE, ".: Inactive Houses :.");
  16.             format(string, sizeof(string), "%02d/%02d/%d", Day, Month, Year);
  17.             new FileName[128];
  18.             for(new i = 0; i < MAX_HOUSES; i++)
  19.             {
  20.                 format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
  21.                 if(fexist(FileName))
  22.                 {
  23.                     Houses[i][LastLoginDay] = HDay;
  24.                     Houses[i][LastLoginMonth] = HMonth;
  25.                     Houses[i][LastLoginYear] = HYear;
  26.                     format(Date, sizeof(Date), "%d/%d/%d", HDay, HMonth, HYear);
  27.                     if(string < Date)
  28.                     {
  29.                         format(string, sizeof(string), "House id: %d", i);
  30.                         SCM(playerid, SERVERCOLOR, string);
  31.                     }
  32.                }
  33.             }
  34.             SCM(playerid, ADMINBLUE, "Use /asellproperty [id], to asell them, use /autoasell to sell them all.");
  35.         }
  36.     }
  37.     return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment