Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.98 KB | None | 0 0
  1.  
  2. CMD:next(playerid)
  3. {
  4. new h = GetPlayerHouseID(playerid);
  5. if(h != INVALID_HOUSE_ID && p_temp[playerid][h_repair_txtid] != -1)
  6. {
  7. new h_class = h_info[h][h_squar]-1;
  8. new int_id = h_info[h][h_int];
  9. STRING_GLOBAL[0] = EOS;
  10. f(STRING_GLOBAL,"%d$", h_info[h][h_squar]*TEXTURE_HOUSE_PRICE);
  11. if(IsPlayerInRangeOfPoint(playerid, 50.0, h_ints[h_class][int_id][i_spawn_pos][0],h_ints[h_class][int_id][i_spawn_pos][1],h_ints[h_class][int_id][i_spawn_pos][2]) && h+50 == GetPlayerVirtualWorld(playerid))
  12. {
  13. new txd_max_value = GetMaxCountTextureHouse(p_temp[playerid][h_repair_txtid]);
  14. if(txd_max_value == -1) return SendError(playerid, "КОД: 7099 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
  15.  
  16. p_temp[playerid][shop_id]++;
  17. if(p_temp[playerid][shop_id] >= txd_max_value) p_temp[playerid][shop_id] = 0;
  18. h_info[h][h_mapping_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
  19. House_Repair(h);
  20. }
  21. if(h_class == 0) return 1;
  22. if(IsPlayerInRangeOfPoint(playerid, 50.0, g_info[h_class-1][g_pX], g_info[h_class-1][g_pY], g_info[h_class-1][g_pZ]) && h+50 == GetPlayerVirtualWorld(playerid))
  23. {
  24. new txd_max_value = GetMaxCountTextureGarage(p_temp[playerid][h_repair_txtid]);
  25. if(txd_max_value == -1) return SendError(playerid, "КОД: 7098 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
  26.  
  27. p_temp[playerid][shop_id]++;
  28. if(p_temp[playerid][shop_id] >= txd_max_value) p_temp[playerid][shop_id] = 0;
  29. h_info[h][h_garage_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
  30. Garage_Repair(h);
  31. }
  32. ShowTextDrawForPlayer(playerid, TD_ID_SHOP);
  33. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], STRING_GLOBAL);
  34. return 1;
  35. }
  36.  
  37. new biz_id = GetPVarInt(playerid, "bID");
  38. if(b_info[biz_id][_tip] == 2 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
  39. {
  40. if(!gang(playerid) && !mafia(playerid) && !biker(playerid) && p_info[playerid][fwork] != true)
  41. {
  42. new string[256];
  43. if(p_info[playerid][sex] == 2)
  44. {
  45. p_temp[playerid][shop_id]++;
  46. if(p_temp[playerid][shop_id] >= sizeof(skinBuyMan)) p_temp[playerid][shop_id] = 0;
  47. SetPlayerSkin(playerid,skinBuyMan[p_temp[playerid][shop_id]][0]);
  48. format(string,sizeof(string),"%d$",skinBuyMan[p_temp[playerid][shop_id]][1]);
  49. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  50. }
  51. else
  52. {
  53. p_temp[playerid][shop_id]++;
  54. if(p_temp[playerid][shop_id] >= sizeof(skinBuyMale)) p_temp[playerid][shop_id] = 0;
  55. SetPlayerSkin(playerid,skinBuyMale[p_temp[playerid][shop_id]][0]);
  56. format(string,sizeof(string),"%d$",skinBuyMale[p_temp[playerid][shop_id]][1]);
  57. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  58. }
  59. return 1;
  60. }
  61. }
  62. else if(b_info[biz_id][_tip] == 10 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
  63. {
  64. new string[256];
  65. new acoords = GetPVarInt(playerid, "AccessoriesCoords"), ainfo = GetPVarInt(playerid, "AccessoriesInfo"), idx = GetPVarInt(playerid, "@accessories");
  66. if(idx == 86) return 1;
  67. if(AccessoriesInfo[idx+1][aType] == ainfo)
  68. {
  69. SetPVarInt(playerid, "@accessories", idx + 1);
  70.  
  71. new sidx = GetPVarInt(playerid, "@accessories"), slot = AccessoriesInfo[sidx][aSlot], model = AccessoriesInfo[sidx][aModel], bone = AccessoriesInfo[sidx][aBone], skin_idx = GetPlayerSkin(playerid);
  72.  
  73. new
  74. Float:fOffsetX = AccessoriesCoords[acoords][skin_idx][0], Float:fOffsetY = AccessoriesCoords[acoords][skin_idx][1], Float:fOffsetZ = AccessoriesCoords[acoords][skin_idx][2],
  75. Float:fRotX = AccessoriesCoords[acoords][skin_idx][3], Float:fRotY = AccessoriesCoords[acoords][skin_idx][4], Float:fRotZ = AccessoriesCoords[acoords][skin_idx][5],
  76. Float:fScaleX = AccessoriesCoords[acoords][skin_idx][6], Float:fScaleY = AccessoriesCoords[acoords][skin_idx][7], Float:fScaleZ = AccessoriesCoords[acoords][skin_idx][8];
  77.  
  78. if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
  79. SetPlayerAttachedObject(playerid, slot, model, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  80. format(string,sizeof(string),"%d$", AccessoriesInfo[sidx][aPrice]);
  81. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  82. }
  83. return 1;
  84. }
  85. return 1;
  86. }
  87.  
  88. CMD:back(playerid)
  89. {
  90. new h = GetPlayerHouseID(playerid);
  91. if(h != INVALID_HOUSE_ID && p_temp[playerid][h_repair_txtid] != -1)
  92. {
  93. new h_class = h_info[h][h_squar]-1;
  94. new int_id = h_info[h][h_int];
  95.  
  96. STRING_GLOBAL[0] = EOS;
  97. f(STRING_GLOBAL,"%d$", h_info[h][h_squar]*TEXTURE_HOUSE_PRICE);
  98. ShowTextDrawForPlayer(playerid, TD_ID_SHOP);
  99. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], STRING_GLOBAL);
  100. if(IsPlayerInRangeOfPoint(playerid, 50.0, h_ints[h_class][int_id][i_spawn_pos][0],h_ints[h_class][int_id][i_spawn_pos][1],h_ints[h_class][int_id][i_spawn_pos][2]) && h+50 == GetPlayerVirtualWorld(playerid))
  101. {
  102. new txd_max_value = GetMaxCountTextureHouse(p_temp[playerid][h_repair_txtid]);
  103. if(txd_max_value == -1) return SendError(playerid, "КОД: 7099 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
  104.  
  105. p_temp[playerid][shop_id]--;
  106. if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (txd_max_value-1);
  107. h_info[h][h_mapping_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
  108. House_Repair(h);
  109. }
  110. if(h_class == 0) return 1;
  111. if(IsPlayerInRangeOfPoint(playerid, 50.0, g_info[h_class-1][g_pX], g_info[h_class-1][g_pY], g_info[h_class-1][g_pZ]) && h+50 == GetPlayerVirtualWorld(playerid))
  112. {
  113. new txd_max_value = GetMaxCountTextureGarage(p_temp[playerid][h_repair_txtid]);
  114. if(txd_max_value == -1) return SendError(playerid, "КОД: 7098 / Обратитесь на форум! %і", p_temp[playerid][h_repair_txtid]);
  115.  
  116. p_temp[playerid][shop_id]--;
  117. if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (txd_max_value-1);
  118. h_info[h][h_garage_id][p_temp[playerid][h_repair_txtid]] = p_temp[playerid][shop_id];
  119. Garage_Repair(h);
  120. }
  121. return 1;
  122. }
  123. new biz_id = GetPVarInt(playerid, "bID");
  124. if(b_info[biz_id][_tip] == 2 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
  125. {
  126. if(!gang(playerid) && !mafia(playerid) && !biker(playerid) && p_info[playerid][fwork] != true)
  127. {
  128. new string[256];
  129. if(p_info[playerid][sex] == 2)
  130. {
  131. p_temp[playerid][shop_id]--;
  132. if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (sizeof(skinBuyMan)-1);
  133. SetPlayerSkin(playerid,skinBuyMan[p_temp[playerid][shop_id]][0]);
  134. format(string,sizeof(string),"%d$",skinBuyMan[p_temp[playerid][shop_id]][1]);
  135. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  136. }
  137. else
  138. {
  139. p_temp[playerid][shop_id]--;
  140. if(p_temp[playerid][shop_id] < 0) p_temp[playerid][shop_id] = (sizeof(skinBuyMale)-1);
  141. SetPlayerSkin(playerid,skinBuyMale[p_temp[playerid][shop_id]][0]);
  142. format(string,sizeof(string),"%d$",skinBuyMale[p_temp[playerid][shop_id]][1]);
  143. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  144. }
  145. }
  146. //ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,0,1,1,1,1);
  147. }
  148. else if(b_info[biz_id][_tip] == 10 && PlayerToPoint(5.0,playerid,b_info[biz_id][b_menu][0],b_info[biz_id][b_menu][1],b_info[biz_id][b_menu][2]))
  149. {
  150. new string[256];
  151. new acoords = GetPVarInt(playerid, "AccessoriesCoords"), ainfo = GetPVarInt(playerid, "AccessoriesInfo"), idx = GetPVarInt(playerid, "@accessories");
  152. if(idx == 0) return 1;
  153. if(AccessoriesInfo[idx-1][aType] == ainfo)
  154. {
  155. SetPVarInt(playerid, "@accessories", idx - 1);
  156.  
  157. new sidx = GetPVarInt(playerid, "@accessories"), slot = AccessoriesInfo[sidx][aSlot], model = AccessoriesInfo[sidx][aModel], bone = AccessoriesInfo[sidx][aBone], skin_idx = GetPlayerSkin(playerid);
  158.  
  159. new
  160. Float:fOffsetX = AccessoriesCoords[acoords][skin_idx][0], Float:fOffsetY = AccessoriesCoords[acoords][skin_idx][1], Float:fOffsetZ = AccessoriesCoords[acoords][skin_idx][2],
  161. Float:fRotX = AccessoriesCoords[acoords][skin_idx][3], Float:fRotY = AccessoriesCoords[acoords][skin_idx][4], Float:fRotZ = AccessoriesCoords[acoords][skin_idx][5],
  162. Float:fScaleX = AccessoriesCoords[acoords][skin_idx][6], Float:fScaleY = AccessoriesCoords[acoords][skin_idx][7], Float:fScaleZ = AccessoriesCoords[acoords][skin_idx][8];
  163.  
  164. if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
  165. SetPlayerAttachedObject(playerid, slot, model, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
  166. format(string,sizeof(string),"%d$", AccessoriesInfo[sidx][aPrice]);
  167. PlayerTextDrawSetString(playerid, PTD_Shop[playerid][10], string);
  168. }
  169. }
  170. return 1;
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement