Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 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, 1, HouseInfo[ h ][ hEntrancex ], HouseInfo[ h ][ hEntrancey ], HouseInfo[ h ][ hEntrancez ], -1, 0, -1, STREAMER_PICKUP_SD );
  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, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  25. }
  26. }
  27. else if(update == 2) {
  28. if(BizzInfo[h][bBuyPrice] != 0) format(pret, 256, "\n{FFFFFF}Price: {40A6FF}$%s (/buybiz)", FormatNumber(BizzInfo[h][bBuyPrice]));
  29. if(BizzInfo[h][bOwned] == 0) {
  30. DestroyDynamic3DTextLabel(BizzLabel[h]);
  31. format(labelString, sizeof(labelString),"{40A6FF}%s{FFFFFF}\n{FFFFFF}Business {40A6FF}%d\n{FFFFFF}This business is for sale {E01F1F}/buybiz\n {FFFFFF}Price: {40A6FF}%s \n{FFFFFF}Level: {40A6FF}%d",BizzInfo[h][bMessage],h,FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevel]);
  32. BizzLabel[h] = CreateDynamic3DTextLabel(labelString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
  33. }
  34. else if(BizzInfo[h][bOwned] == 1) {
  35. DestroyDynamic3DTextLabel(BizzLabel[h]);
  36. format(labelString, sizeof(labelString),"{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);
  37. BizzLabel[h] = CreateDynamic3DTextLabel(labelString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0);
  38. }
  39. }
  40. return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement