Stefantjuh97

Untitled

Dec 6th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.14 KB | None | 0 0
  1. command(checkinactivehouses, playerid, params[])
  2. {
  3.     new string[128], Day, Month, Year;
  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.             new CheckDate;
  17.             format(CheckDate, sizeof(CheckDate), "%02d/%02d/%d", Day, Month, Year);
  18.             new FileName[128];
  19.             for(new i = 0; i < MAX_HOUSES; i++)
  20.             {
  21.                 format(FileName, sizeof(FileName), "Houses/House_%d.ini", i);
  22.                 if(fexist(FileName))
  23.                 {
  24.                     Houses[i][OwnerLastLogin] = dini_Int(FileName, "OwnerLastLogin");
  25.                     if(CheckDate < Houses[i][OwnerLastLogin])
  26.                     {
  27.                         format(string, sizeof(string), "House id: %d", i);
  28.                         SCM(playerid, SERVERCOLOR, string);
  29.                     }
  30.                }
  31.             }
  32.             SCM(playerid, ADMINBLUE, "Use /asellproperty [id], to asell them, use /autoasell to sell them all.");
  33.         }
  34.     }
  35.     return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment