Advertisement
Vennox

Untitled

May 8th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.46 KB | None | 0 0
  1. public OnPropTextdrawUpdate(update, h)
  2. {
  3.     new PropertyString[256];
  4.     if(update == 1)
  5.     {
  6.         if(HouseInfo[h][hOwned] == 0)
  7.         {
  8.             Delete3DTextLabel(HouseLabel[h]);
  9.             format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {FF0000}#%d \n{FF0000}Casa este de vanzare(/buyhouse) ! \n{FFFFFF}Owner: {FF0000}AdmBot\n{FFFFFF}Description: {FF0000}%s \n{FFFFFF}Price: {FF0000}$%s \n{FFFFFF}Level: {FF0000}%d",h,HouseInfo[h][hDiscription],FormatNumber(HouseInfo[h][hValue]),HouseInfo[h][hLevel]);
  10.             HouseLabel[h] = Create3DTextLabel(PropertyString ,0x09FF00CC,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],100, 0, 1);
  11.             DestroyPickup(HousePickup[h]);
  12.             HousePickup[h] = CreatePickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  13.         }
  14.         else if(HouseInfo[h][hOwned] == 1)
  15.         {
  16.             new tenants=0,query[256];
  17.             format(query, sizeof(query), "SELECT * FROM `users` WHERE `Rented` = '%d'", h);
  18.             new Cache: membresult = mysql_query(SQL, query);
  19.             for(new i, j = cache_get_row_count (); i != j; ++i)
  20.             {
  21.                 tenants++;
  22.             }
  23.             cache_delete(membresult);
  24.             if(HouseInfo[h][hRentabil] == 1)
  25.             {
  26.                 Delete3DTextLabel(HouseLabel[h]);
  27.                 format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {FF0000}%d \n{FF0000}%s \n{FFFFFF}Owner {FF0000}%s \n{FFFFFF}Tenants: {FF0000}%d \n{FFFFFF}Rent: {FF0000}$%s \n{FFFFFF}Level: {FF0000}%d \n{FF0000}To rent a room type /rentroom",h,HouseInfo[h][hDiscription],HouseInfo[h][hOwner],tenants,FormatNumber(HouseInfo[h][hRent]),HouseInfo[h][hLevel]);
  28.                 HouseLabel[h] = Create3DTextLabel(PropertyString ,0x09FF00CC,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],100, 0, 1);
  29.                 DestroyPickup(HousePickup[h]);
  30.                 HousePickup[h] = CreatePickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  31.             }
  32.             else
  33.             {
  34.                 Delete3DTextLabel(HouseLabel[h]);
  35.                 format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {FF0000}%d \n{FF0000}%s \n{FFFFFF}Owner {FF0000}%s \n{FFFFFF}Tenants: {FF0000}%d \n{FFFFFF}Level: {FF0000}%d",h,HouseInfo[h][hDiscription],HouseInfo[h][hOwner], tenants, HouseInfo[h][hLevel]);
  36.                 HouseLabel[h] = Create3DTextLabel(PropertyString ,0x09FF00CC,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],100, 0, 1);
  37.                 DestroyPickup(HousePickup[h]);
  38.                 HousePickup[h] = CreatePickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  39.             }
  40.         }
  41.     }
  42.     else if(update == 2)
  43.     {
  44.         if(BizzInfo[h][bOwned] == 0)
  45.         {
  46.             Delete3DTextLabel(BizzLabel[h]);
  47.             format(PropertyString, sizeof(PropertyString),"{357AB7}%s \n{FFFFFF}Business {357AB7}#%d \n{357AB7}Business-ul este de vanzare(/buybiz) ! \n{FFFFFF}Owner: {357AB7}AdmBot \n {FFFFFF}Price: {357AB7}%s \n{FFFFFF}Level: {357AB7}%d",BizzInfo[h][bMessage],h,FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevelNeeded]);
  48.             BizzLabel[h] = Create3DTextLabel(PropertyString ,0x0066FFCC,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],100, 0, 1);
  49.         }
  50.         else if(BizzInfo[h][bOwned] == 1)
  51.         {
  52.             Delete3DTextLabel(BizzLabel[h]);
  53.             format(PropertyString, sizeof(PropertyString),"{357AB7}%s \n{FFFFFF}Business {357AB7}#%d \n{FFFFFF}Owner: {357AB7}%s \n{FFFFFF}Fee: {357AB7}$%s",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]),BizzInfo[h][bLevelNeeded]);
  54.             BizzLabel[h] = Create3DTextLabel(PropertyString ,0x0066FFCC,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],100, 0, 1);
  55.         }
  56.     }
  57.     return 1;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement