Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1.  
  2.  
  3.  
  4. enum hitem
  5. {
  6. setting,
  7. nkaina,
  8. owner_name[MAX_PLAYER_NAME]
  9. }
  10. new houseDB[256][hitem];
  11.  
  12. enum settings
  13. {
  14. interior,
  15. Float:enter_pos[3]
  16. }
  17. new houseSETTINGS[5][settings];
  18.  
  19. stock PrepareHouseSystem()
  20. {
  21. houseSETTINGS[0][interior]=10;
  22. houseSETTINGS[1][interior]=7;
  23. houseSETTINGS[2][interior]=15;
  24. houseSETTINGS[3][interior]=5;
  25. houseSETTINGS[4][interior]=9;
  26.  
  27. houseSETTINGS[0][enter_pos][0]=2260.76;
  28. houseSETTINGS[0][enter_pos][1]=-1210.45;
  29. houseSETTINGS[0][enter_pos][2]=1049.02;
  30.  
  31. houseSETTINGS[1][enter_pos][0]=225.4974;
  32. houseSETTINGS[1][enter_pos][1]=1023.3127;
  33. houseSETTINGS[1][enter_pos][2]=1084.0122;
  34.  
  35. houseSETTINGS[2][enter_pos][0]=373.2839;
  36. houseSETTINGS[2][enter_pos][1]=1417.5103;
  37. houseSETTINGS[2][enter_pos][2]=1081.3281;
  38.  
  39. houseSETTINGS[3][enter_pos][0]=230.9863;
  40. houseSETTINGS[3][enter_pos][1]=1114.4048;
  41. houseSETTINGS[3][enter_pos][2]=1080.9922;
  42.  
  43. houseSETTINGS[4][enter_pos][0]=261.1820;
  44. houseSETTINGS[4][enter_pos][1]=1239.1514;
  45. houseSETTINGS[4][enter_pos][2]=1084.2578;
  46.  
  47. new file[128], text[53]; print("Kraunami namai");
  48. for(new house=0; house<pickups[1][namai]+1; house++)
  49. {
  50. format(file,sizeof(file),"saves/house/%i",house);
  51. houseDB[house][nkaina]=100000+random(500000);
  52. if(!fexist(file))
  53. {
  54. format(text,sizeof(text),"Namas parduodamas! Kaina: %i LT",houseDB[house][nkaina]);
  55. Update3DTextLabelText(houseDB2[house][housetext],TEXTCOL_WHITE,text);
  56. strmid(houseDB[house][owner_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
  57. continue;
  58. }
  59. strmid(houseDB[house][owner_name],dini_Get(file,"owner"),0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
  60. format(text,sizeof(text),"Turtas priklauso: %s",houseDB[house][owner_name]);
  61. Update3DTextLabelText(houseDB2[house][housetext],TEXTCOL_GOLD,text);
  62. houseDB[house][setting]=dini_Int(file,"setting");
  63. printf("Namas %i priklauso %s (vidaus ID: %i)",house,houseDB[house][owner_name],houseDB[house][setting]);
  64. }
  65.  
  66. print("Kraunami bizniai");
  67. for(new house=pickups[0][bizniss]; house<pickups[1][bizniss]+1; house++)
  68. {
  69. format(file,sizeof(file),"saves/bussines/%i",house);
  70. if(!fexist(file))
  71. {
  72. strmid(bussinesDB[house][own_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
  73. continue;
  74. }
  75. strmid(bussinesDB[house][own_name],dini_Get(file,"owner"),0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
  76. printf("Biznis %i priklauso %s",house,bussinesDB[house][own_name]);
  77. format(text,sizeof(text),"Turtas priklauso: %s",house,bussinesDB[house][own_name]);
  78. Update3DTextLabelText(bussinesDB[house][housetext],TEXTCOL_GOLD,text);
  79.  
  80. }
  81.  
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement