Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. function UpdateLabel(update, h) {
  2. new labelString[300], pret[100];
  3. if(update == 1) {
  4. if(HouseInfo[h][hValue] != 0) format(pret, 256, "\n{FFFFFF}Price: {E01F1F}$%s (/buyhouse)", FormatNumber(HouseInfo[h][hValue]));
  5. if(HouseInfo[h][hOwned] == 0) {
  6. DestroyDynamic3DTextLabel(HouseLabel[h]);
  7. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  8. HouseInfo[h][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  9. format(labelString, sizeof(labelString),"{FFFFFF}House {109E00}%d \n{FFFFFF}This house is for sale {E01F1F}/buyhouse\n {FFFFFF}Description: {109E00}%s \n{FFFFFF}Price: {109E00}$%s \n{FFFFFF}Level: {109E00}%d",h,HouseInfo[h][hDiscription],FormatNumber(HouseInfo[h][hValue]),HouseInfo[h][hLevel]);
  10. HouseLabel[h] = CreateDynamic3DTextLabel(labelString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
  11. }
  12. else if(HouseInfo[h][hOwned] == 1) {
  13. if(HouseInfo[h][hRentabil] == 1) {
  14. DestroyDynamic3DTextLabel(HouseLabel[h]);
  15. format(labelString, sizeof(labelString),"{109E00}%s{FFFFFF}\nHouse {109E00}%d \n{FFFFFF}Owner: {109E00}%s \n{FFFFFF}Rent: {109E00}$%s (/rentroom) \n{FFFFFF}Level: {109E00}%d%s",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner],FormatNumber(HouseInfo[h][hRent]),HouseInfo[h][hLevel],pret);
  16. HouseLabel[h] = CreateDynamic3DTextLabel(labelString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
  17. }
  18. else {
  19. DestroyDynamic3DTextLabel(HouseLabel[h]);
  20. format(labelString, sizeof(labelString),"{109E00}%s{FFFFFF}\nHouse {109E00}%d \n{FFFFFF}Owner: {109E00}%s \n{FFFFFF}Level: {109E00}%d%s",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner], HouseInfo[h][hLevel],pret);
  21. HouseLabel[h] = CreateDynamic3DTextLabel(labelString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
  22. }
  23. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  24. HouseInfo[h][hPickupID] = CreateDynamicPickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement