Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.83 KB | None | 0 0
  1. function LoadBizz() {
  2. new result[100],index = 0;
  3. mysql_query(SQL,"SELECT * FROM `bizz` ORDER BY `bizz`.`ID` ASC");
  4. mysql_store_result();
  5. while(mysql_retrieve_row()) {
  6. bussines++;
  7. index++;
  8. new i = index;
  9. mysql_get_field("ID", result); BizzInfo[i][bID] = strval(result);
  10. mysql_get_field("Owned", result); BizzInfo[i][bOwned] = strval(result);
  11. mysql_get_field("Owner", result); strmid(BizzInfo[i][bOwner], result, 0, 32, 32);
  12. mysql_get_field("Message", result); strmid(BizzInfo[i][bMessage], result, 0, 100, 100);
  13. mysql_get_field("EntranceX", result); BizzInfo[i][bEntranceX] = floatstr(result);
  14. mysql_get_field("EntranceY", result); BizzInfo[i][bEntranceY] = floatstr(result);
  15. mysql_get_field("EntranceZ", result); BizzInfo[i][bEntranceZ] = floatstr(result);
  16. mysql_get_field("ExitX", result); BizzInfo[i][bExitX] = floatstr(result);
  17. mysql_get_field("ExitY", result); BizzInfo[i][bExitY] = floatstr(result);
  18. mysql_get_field("ExitZ", result); BizzInfo[i][bExitZ] = floatstr(result);
  19. mysql_get_field("LevelNeeded", result); BizzInfo[i][bLevel] = strval(result);
  20. mysql_get_field("BuyPrice", result); BizzInfo[i][bBuyPrice] = strval(result);
  21. mysql_get_field("EntranceCost", result); BizzInfo[i][bFee] = strval(result);
  22. mysql_get_field("Till", result); BizzInfo[i][bBalance] = strval(result);
  23. mysql_get_field("Locked", result); BizzInfo[i][bLocked] = strval(result);
  24. mysql_get_field("Interior", result); BizzInfo[i][bInterior] = strval(result);
  25. mysql_get_field("Virtual", result); BizzInfo[i][bVirtual] = strval(result);
  26. mysql_get_field("Radio", result); BizzInfo[i][bRadio] = strval(result);
  27. mysql_get_field("Static", result); BizzInfo[i][bStatic] = strval(result);
  28. mysql_get_field("Gas", result); BizzInfo[i][bGas] = strval(result);
  29. mysql_get_field("Type", result); BizzInfo[i][bType] = strval(result);
  30.  
  31. BizzInfo[i][bPickup] = CreateDynamicPickup(1239, 23, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
  32. UpdateLabel(2,BizzInfo[i][bID]);
  33.  
  34. switch(BizzInfo[i][bType]) {
  35. case 1: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],52,0,0,0,-1,500.0); // banca
  36. case 2: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],6,0,0,0,-1,500.0); // gun shop
  37. case 3: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],49,0,0,0,-1,500.0); // club
  38. case 4: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],50,0,0,0,-1,500.0); // restaurant
  39. case 5: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],38,0,0,0,-1,500.0); // sexshop
  40. case 6: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],17,0,0,0,-1,500.0); // 24/7
  41. case 7: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],45,0,0,0,-1,500.0); // binco
  42. case 8: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],10,0,0,0,-1,500.0); // burger
  43. case 9: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],25,0,0,0,-1,500.0); // casino
  44. case 10: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],16,0,0,0,-1,500.0); // cnn
  45. //case 11: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],16,0,0,0,-1,500.0); // moto
  46. case 12: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],55,0,0,0,-1,500.0); // car
  47. case 13: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // cs
  48. //case 14: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // furniture
  49. case 15: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],63,0,0,0,-1,500.0); // car color
  50. case 16: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // paint
  51. case 17: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],51,0,0,0,-1,500.0); // gas station
  52. case 18: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],53,0,0,0,-1,500.0); // race
  53. case 19: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],63,0,0,0,-1,500.0); // pns
  54. case 20: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],9,0,0,0,-1,500.0); // pescarie
  55. case 21: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],29,0,0,0,-1,500.0); // pizza
  56. case 27: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],29,0,0,0,-1,500.0); // tuning
  57. }
  58. }
  59. mysql_free_result();
  60. printf("Bussines: %d", index);
  61. return 1;
  62. }
  63.  
  64.  
  65. function LoadFactions() {
  66. new result[100],index = 0;
  67. mysql_query(SQL,"SELECT * FROM `factions` ORDER BY `factions`.`ID` ASC");
  68. mysql_store_result();
  69. new label[128];
  70. while(mysql_retrieve_row()) {
  71. index++;
  72. new i = index;
  73. mysql_get_field("ID", result); DynamicFactions[i][fID] = strval(result);
  74. mysql_get_field("Name", result); strmid(DynamicFactions[i][fName], result, 0, 100, 100);
  75. mysql_get_field("IntX", result); DynamicFactions[i][fcX] = floatstr(result);
  76. mysql_get_field("IntY", result); DynamicFactions[i][fcY] = floatstr(result);
  77. mysql_get_field("IntZ", result); DynamicFactions[i][fcZ] = floatstr(result);
  78. mysql_get_field("X", result); DynamicFactions[i][extX] = floatstr(result);
  79. mysql_get_field("Y", result); DynamicFactions[i][extY] = floatstr(result);
  80. mysql_get_field("Z", result); DynamicFactions[i][extZ] = floatstr(result);
  81. mysql_get_field("VW", result); DynamicFactions[i][fVW] = strval(result);
  82. mysql_get_field("Interior", result); DynamicFactions[i][fInterior] = strval(result);
  83. mysql_get_field("Mats", result); DynamicFactions[i][fMats] = strval(result);
  84. mysql_get_field("Drugs", result); DynamicFactions[i][fDrugs] = strval(result);
  85. mysql_get_field("Bank", result); DynamicFactions[i][fBank] = strval(result);
  86. mysql_get_field("Anunt", result); strmid(DynamicFactions[i][fAnn], result, 0, 100, 100);
  87. mysql_get_field("App", result); DynamicFactions[i][fApp] = strval(result);
  88. mysql_get_field("Lock", result); DynamicFactions[i][fLock] = strval(result);
  89.  
  90. mysql_get_field("Name1", result); strmid(fRankNames[i][0], result, 0, 100, 100);
  91. mysql_get_field("Name2", result); strmid(fRankNames[i][1], result, 0, 100, 100);
  92. mysql_get_field("Name3", result); strmid(fRankNames[i][2], result, 0, 100, 100);
  93. mysql_get_field("Name4", result); strmid(fRankNames[i][3], result, 0, 100, 100);
  94. mysql_get_field("Name5", result); strmid(fRankNames[i][4], result, 0, 100, 100);
  95. mysql_get_field("Name6", result); strmid(fRankNames[i][5], result, 0, 100, 100);
  96. mysql_get_field("Name7", result); strmid(fRankNames[i][6], result, 0, 100, 100);
  97.  
  98. new x = i;
  99.  
  100. if(DynamicFactions[i][fLock] == 0) format(label, sizeof(label), "%s's HQ\n(locked)", DynamicFactions[i][fName]);
  101. else format(label, sizeof(label), "%s's HQ\n(unlocked)", DynamicFactions[i][fName]);
  102. DynamicFactions[i][fLabel] = Create3DTextLabel(label,COLOR_WHITE,DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],20.0, 0, 1);
  103.  
  104. if(x == 1 || x == 2 || x == 3) CreatePickup(1247, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
  105. else if(x == 4 || x == 5 || x == 6 || x == 10) CreatePickup(1313, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
  106. else CreatePickup(1314, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
  107.  
  108.  
  109. if(x == 4) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],62,0,0,0,-1,500.0);
  110. if(x == 5) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],58,0,0,0,-1,500.0);
  111. if(x == 6) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],60,0,0,0,-1,500.0);
  112. if(x == 10) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],59,0,0,0,-1,500.0);
  113. }
  114. mysql_free_result();
  115. printf("Factions: %d", index);
  116. return 1;
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement