Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 KB | None | 0 0
  1. function UpdateLabel(update, h)
  2. {
  3. new PropertyString[256];
  4. if(update == 1)
  5. {
  6. new pret[100];
  7. if(HouseInfo[h][hValue] != 0) format(pret, 256, "\n{FFFFFF}Price: {E01F1F}$%s (/buyhouse)", FormatNumber(HouseInfo[h][hValue]));
  8.  
  9. if(HouseInfo[h][hOwned] == 0)
  10. {
  11. DestroyDynamic3DTextLabel(HouseLabel[h]);
  12. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  13. HouseInfo[h][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  14. format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {E01F1F}%d \n{FFFFFF}This house is for sale\nDescription: {E01F1F}%s \n{FFFFFF}Price: {E01F1F}$%s \n{FFFFFF}Level: {E01F1F}%d \n{FFFFFF}Pentru a cumpara aceasta casa, tasteaza {E01F1F}/buyhouse",h,HouseInfo[h][hDiscription],FormatNumber(HouseInfo[h][hValue]),HouseInfo[h][hLevel]);
  15. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  16. CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],31,0,-1,0,-1,500.0);
  17. }
  18. else if(HouseInfo[h][hOwned] == 1)
  19. {
  20. if(HouseInfo[h][hRentabil] == 1)
  21. {
  22. DestroyDynamic3DTextLabel(HouseLabel[h]);
  23. format(PropertyString, sizeof(PropertyString),"{E01F1F}%s{FFFFFF}\nHouse {E01F1F}%d \n{FFFFFF}Owner: {E01F1F}%s \n{FFFFFF}Rent: {E01F1F}$%s (/rentroom) \n{FFFFFF}Level: {E01F1F}%d%s",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner],FormatNumber(HouseInfo[h][hRent]),HouseInfo[h][hLevel],pret);
  24. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  25. CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],32,0,-1,0,-1,500.0);
  26. }
  27. else
  28. {
  29. DestroyDynamic3DTextLabel(HouseLabel[h]);
  30. format(PropertyString, sizeof(PropertyString),"{E01F1F}%s{FFFFFF}\nHouse {E01F1F}%d \n{FFFFFF}Owner: {E01F1F}%s \n{FFFFFF}Level: {E01F1F}%d%s",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner], HouseInfo[h][hLevel],pret);
  31. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  32. CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],32,0,-1,0,-1,500.0);
  33. }
  34. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  35. HouseInfo[h][hPickupID] = CreateDynamicPickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  36. }
  37. }
  38. else if(update == 2)
  39. {
  40. new pret[180];
  41. if(BizzInfo[h][bBuyPrice] != 0) format(pret, 256, "\n{FFFFFF}Price: {40A6FF}$%s (/buybiz)", FormatNumber(BizzInfo[h][bBuyPrice]));
  42.  
  43. if(BizzInfo[h][bOwned] == 0)
  44. {
  45. DestroyDynamic3DTextLabel(BizzLabel[h]);
  46. format(PropertyString, sizeof(PropertyString),"{40A6FF}%s{FFFFFF}\n{FFFFFF}Business {40A6FF}#%d\n{FFFFFF}This business is for sale \n {FFFFFF}Price: {40A6FF}%s \n{FFFFFF}Level: {40A6FF}%d",BizzInfo[h][bMessage],h,FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevel]);
  47. BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  48. }
  49. else if(BizzInfo[h][bOwned] == 1)
  50. {
  51. DestroyDynamic3DTextLabel(BizzLabel[h]);
  52. format(PropertyString, sizeof(PropertyString),"{40A6FF}%s{FFFFFF}\n{FFFFFF}Business {40A6FF}#%d\n{FFFFFF}Owner: {40A6FF}%s \n{FFFFFF}Fee: {40A6FF}$%s\n{FFFFFF}Level:{40A6FF} %d%s",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bFee]),BizzInfo[h][bLevel],pret);
  53. BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  54. }
  55. }
  56. return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement