Guest User

Untitled

a guest
Dec 16th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.16 KB | None | 0 0
  1. [HTML]if(newkeys & KEY_YES)
  2. {
  3. new vehicleid = GetPlayerNearestVehicle(playerid);
  4. new model = GetVehicleModel(vehicleid);
  5. if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1) /// Loading Materials / lead
  6. {
  7. if(model == 499 || model == 456)
  8. {
  9. if(GetPVarInt(playerid, "GotDaMaterialsBro") == 1) // Storing metal in to the Trailer // pick pickaxe
  10. {
  11. if(vehicleMetal[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
  12. vehicleMetal[vehicleid] += 100;
  13. SetPVarInt(playerid, "GotDaMaterialsBro", 0);
  14. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s, you have just stored 100 pieces of metal in to your trailer.", RPName(playerid));
  15. ClearAnimations(playerid);
  16. for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  17. {
  18. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
  19. }
  20. if(GetPVarInt(playerid, "GotDaMaterialsBro") == 2) // Storing Lead in to the trailer
  21. {
  22. if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
  23. vehicleLead[vehicleid] += 100;
  24. SetPVarInt(playerid, "GotDaMaterialsBro", 0);
  25. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s, you have just stored 100 pieces of lead in to your trailer.", RPName(playerid));
  26. ClearAnimations(playerid);
  27. for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  28. {
  29. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
  30.  
  31. }
  32. if(GetPVarInt(playerid, "GotDaMaterialsBro") == 3) // Storing both metal back inside trailer
  33. {
  34. if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
  35. vehicleMetal[vehicleid] += 100;
  36. SetPVarInt(playerid, "GotDaMaterialsBro", 0);
  37. Action(playerid, "places the box of metal back inside the trailer");
  38. ClearAnimations(playerid);
  39. for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  40. {
  41. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
  42. }
  43. if(GetPVarInt(playerid, "GotDaMaterialsBro") == 4) // Storing both lead back inside trailer
  44. {
  45. if(vehicleLead[vehicleid] >= 50000) return SendClientError(playerid, "Your Truck can hold the maximum of 50000 pieces of Metal.");
  46. vehicleLead[vehicleid] += 100;
  47. SetPVarInt(playerid, "GotDaMaterialsBro", 0);
  48. Action(playerid, "places the box of lead back inside the trailer");
  49. ClearAnimations(playerid);
  50. for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  51. {
  52. if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);}
  53. }
  54. }
  55. }[/HTML]
  56.  
  57.  
  58. [HTML]if(newkeys & KEY_NO)
  59. {
  60. new vehicleid = GetPlayerNearestVehicle(playerid);
  61. new model = GetVehicleModel(vehicleid);
  62. if(IsPlayerInRangeOfPoint(playerid, 4.0, 150.3020,1391.3124,10.5859))
  63. {
  64. if(!IsPlayerFED(playerid))
  65. {
  66. if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
  67. if(GetPVarInt(playerid, "GotDaMaterialsBro") > 0) return SendClientError(playerid, "You already have metal or lead on you");
  68. GivePlayerMoneyEx(playerid, -1250);
  69. SetPVarInt(playerid, "GotDaMaterialsBro", 1); // 1 Indicates Metal
  70. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 100 metal pieces.",RPName(playerid));
  71. SetPlayerAttachedObject(playerid, 1, 12201, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  72. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  73. }
  74. else return SendClientError(playerid, "This is only for illegal factions");
  75. }
  76. if(IsPlayerInRangeOfPoint(playerid, 6.0, 571.8118,1220.7935,11.7113))
  77. {
  78. if(!IsPlayerFED(playerid))
  79. {
  80. if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
  81. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
  82. GivePlayerMoneyEx(playerid, -1250);
  83. SetPVarInt(playerid, "GotDaMaterialsBro", 2); // 1 Indicates Metal
  84. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 50 lead pieces.", RPName(playerid));
  85. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  86. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  87. }
  88. else return SendClientError(playerid, "This is only for illegal factions");
  89. }
  90. if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1)
  91. {
  92. if(model == 499 || model == 456 || model == 414)
  93. {
  94. if(vehicleMetal[vehicleid] >= 100)
  95. {
  96. vehicleMetal[vehicleid] -= 100;
  97. Action(playerid, "takes a box of metal from the back of the trailer");
  98. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 0) return SendClientError(playerid, "You already have metal or lead on you");
  99. SetPVarInt(playerid, "GotDaMaterialsBro", 3); // 3 Indicates metal
  100. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  101. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  102. return 1;
  103. }
  104. else if(vehicleLead[vehicleid] >= 100)
  105. {
  106. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
  107. vehicleLead[vehicleid] -= 100;
  108. Action(playerid, "takes a box of lead from the back of the trailer");
  109. SetPVarInt(playerid, "GotDaMaterialsBro", 4); // 4 Indicates lead
  110. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  111. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  112. return 1;
  113. }
  114. else return SendClientError(playerid, "There needs to be atleast 100 lead or 100 metal inside your trailer.");
  115. }
  116. }
  117. }[/HTML]
  118.  
  119. if(newkeys & KEY_NO)
  120. {
  121. new vehicleid = GetPlayerNearestVehicle(playerid);
  122. new model = GetVehicleModel(vehicleid);
  123. if(IsPlayerInRangeOfPoint(playerid, 4.0, 150.3020,1391.3124,10.5859))
  124. {
  125. if(!IsPlayerFED(playerid))
  126. {
  127. if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
  128. if(GetPVarInt(playerid, "GotDaMaterialsBro") > 0) return SendClientError(playerid, "You already have metal or lead on you");
  129. GivePlayerMoneyEx(playerid, -1250);
  130. SetPVarInt(playerid, "GotDaMaterialsBro", 1); // 1 Indicates Metal
  131. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 100 metal pieces.",RPName(playerid));
  132. SetPlayerAttachedObject(playerid, 1, 12201, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  133. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  134. }
  135. else return SendClientError(playerid, "This is only for illegal factions");
  136. }
  137. if(IsPlayerInRangeOfPoint(playerid, 6.0, 571.8118,1220.7935,11.7113))
  138. {
  139. if(!IsPlayerFED(playerid))
  140. {
  141. if(PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playerid, "You need to be inside a faction");
  142. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
  143. GivePlayerMoneyEx(playerid, -1250);
  144. SetPVarInt(playerid, "GotDaMaterialsBro", 2); // 1 Indicates Metal
  145. SendClientMSG(playerid, COLOR_LIGHTGREY, "[WareHouse] %s you are currently carrying a crate with 50 lead pieces.", RPName(playerid));
  146. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  147. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  148. }
  149. else return SendClientError(playerid, "This is only for illegal factions");
  150. }
  151. if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) < 5.1)
  152. {
  153. if(model == 499 || model == 456 || model == 414)
  154. {
  155. if(vehicleMetal[vehicleid] >= 100)
  156. {
  157. vehicleMetal[vehicleid] -= 100;
  158. Action(playerid, "takes a box of metal from the back of the trailer");
  159. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 0) return SendClientError(playerid, "You already have metal or lead on you");
  160. SetPVarInt(playerid, "GotDaMaterialsBro", 3); // 3 Indicates metal
  161. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  162. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  163. return 1;
  164. }
  165. else if(vehicleLead[vehicleid] >= 100)
  166. {
  167. if(GetPVarInt(playerid, "GotDaMaterialsBro") >= 1) return SendClientError(playerid, "You already have metal or lead on you");
  168. vehicleLead[vehicleid] -= 100;
  169. Action(playerid, "takes a box of lead from the back of the trailer");
  170. SetPVarInt(playerid, "GotDaMaterialsBro", 4); // 4 Indicates lead
  171. SetPlayerAttachedObject(playerid, 1, 1220, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
  172. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  173. return 1;
  174. }
  175. else return SendClientError(playerid, "There needs to be atleast 100 lead or 100 metal inside your trailer.");
  176. }
  177. }
  178. }
Advertisement
Add Comment
Please, Sign In to add comment