Guest User

Car Sound HOMEHOTS

a guest
Aug 6th, 2014
1,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. new tune[MAX_PLAYERS];
  5. new ob2;
  6. new ob3;
  7. new ob5;
  8. new ob6;
  9. new ob7;
  10. new ob11;
  11. new ob12;
  12. new ob13;
  13. new ob14;
  14. new ob15;
  15. new ob16;
  16. new ob17;
  17. new ob18;
  18. new ob19;
  19. new ob20;
  20.  
  21.  
  22. public OnPlayerExitVehicle(playerid, vehicleid)
  23. {
  24. if (tune[playerid] == 1)
  25. {
  26. ob2= CreateObject(1793, -0.45210, -3.56210, -0.29220, 0.00000, 0.00000, 0.00000);
  27. SetObjectMaterial(ob2, 0, 11301, "carshow_sfse", "ws_carpark2", 0xFF4F4F4F);
  28. ob3= CreateObject(1961, -0.37950, -1.15080, 0.37990, -90.00000, 0.00000, 0.00000);
  29. SetObjectMaterial(ob3, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  30. ob5= CreateObject(1944, 0.48330, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  31. SetObjectMaterial(ob5, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  32. ob6= CreateObject(1944, 0.04330, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  33. SetObjectMaterial(ob6, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  34. ob7= CreateObject(1944, -0.39670, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  35. SetObjectMaterial(ob7, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  36. ob11= CreateObject(1961, 0.42388, -1.19945, 0.37990, -90.00000, 0.00000, 0.00000);
  37. SetObjectMaterial(ob11, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  38. ob12= CreateObject(1961, -0.37040, -2.21100, 0.37990, -90.00000, 0.00000, 0.00000);
  39. SetObjectMaterial(ob12, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  40. ob13= CreateObject(1961, 0.41050, -2.20910, 0.37990, -90.00000, 0.00000, 0.00000);
  41. SetObjectMaterial(ob13, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  42. ob14= CreateObject(2263, -0.60740, -3.64590, -0.26170, 0.00000, 0.00000, 0.00000);
  43. SetObjectMaterial(ob14, 3, 14385, "trailerkb", "tr_wood1");
  44. SetObjectMaterialText(ob14, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  45. SetObjectMaterial(ob14, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  46. ob15= CreateObject(2263, 0.63620, -3.65090, -0.26170, 0.00000, 0.00000, 0.00000);
  47. SetObjectMaterialText(ob15, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  48. SetObjectMaterial(ob15, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  49. ob16= CreateObject(2263, 0.01410, -3.65250, -0.26170, 0.00000, 0.00000, 0.00000);
  50. SetObjectMaterialText(ob16, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  51. SetObjectMaterial(ob16, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  52. ob17= CreateObject(1945, -0.38050, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  53. SetObjectMaterial(ob17, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  54. ob18= CreateObject(1945, -0.06050, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  55. SetObjectMaterial(ob18, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  56. ob19= CreateObject(1945, 0.23950, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  57. SetObjectMaterial(ob19, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  58. ob20= CreateObject(1945, 0.53950, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  59. SetObjectMaterial(ob20, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  60. tune[playerid] = 0;
  61. }
  62. }
  63. public OnPlayerConnect(playerid)
  64. {
  65. tune[playerid] = 0;
  66. SendClientMessage(playerid,-1,"Você adicionou som ao seu veículo");
  67. return 1;
  68. }
  69. CMD:tunar(playerid, params[])
  70. {
  71. new vehicleid = GetPlayerVehicleID(playerid);
  72. if(GetVehicleModel(vehicleid) == 554) // 411 is the infernus model
  73. {
  74. tune[playerid] = 1;
  75. ob2= CreateObject(1793, -0.45210, -3.56210, -0.29220, 0.00000, 0.00000, 0.00000);
  76. SetObjectMaterial(ob2, 0, 11301, "carshow_sfse", "ws_carpark2", 0xFF4F4F4F);
  77. ob3= CreateObject(1961, -0.37950, -1.15080, 0.37990, -90.00000, 0.00000, 0.00000);
  78. SetObjectMaterial(ob3, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  79. ob5= CreateObject(1944, 0.48330, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  80. SetObjectMaterial(ob5, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  81. ob6= CreateObject(1944, 0.04330, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  82. SetObjectMaterial(ob6, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  83. ob7= CreateObject(1944, -0.39670, -1.70080, 0.34810, 90.00000, 0.00000, 0.00000);
  84. SetObjectMaterial(ob7, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  85. ob11= CreateObject(1961, 0.42388, -1.19945, 0.37990, -90.00000, 0.00000, 0.00000);
  86. SetObjectMaterial(ob11, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  87. ob12= CreateObject(1961, -0.37040, -2.21100, 0.37990, -90.00000, 0.00000, 0.00000);
  88. SetObjectMaterial(ob12, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  89. ob13= CreateObject(1961, 0.41050, -2.20910, 0.37990, -90.00000, 0.00000, 0.00000);
  90. SetObjectMaterial(ob13, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER2");
  91. ob14= CreateObject(2263, -0.60740, -3.64590, -0.26170, 0.00000, 0.00000, 0.00000);
  92. SetObjectMaterial(ob14, 3, 14385, "trailerkb", "tr_wood1");
  93. SetObjectMaterialText(ob14, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  94. SetObjectMaterial(ob14, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  95. ob15= CreateObject(2263, 0.63620, -3.65090, -0.26170, 0.00000, 0.00000, 0.00000);
  96. SetObjectMaterialText(ob15, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  97. SetObjectMaterial(ob15, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  98. ob16= CreateObject(2263, 0.01410, -3.65250, -0.26170, 0.00000, 0.00000, 0.00000);
  99. SetObjectMaterialText(ob16, "Ì", 0, OBJECT_MATERIAL_SIZE_64x64, "Wingdings", 100, 1, 0xfff0f0f0, 0, 1);
  100. SetObjectMaterial(ob16, 1, 8409, "gnhotel1", "gnhotelwall02_128", 1);
  101. ob17= CreateObject(1945, -0.38050, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  102. SetObjectMaterial(ob17, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  103. ob18= CreateObject(1945, -0.06050, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  104. SetObjectMaterial(ob18, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  105. ob19= CreateObject(1945, 0.23950, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  106. SetObjectMaterial(ob19, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  107. ob20= CreateObject(1945, 0.53950, -2.99620, 0.40810, -90.00000, 0.00000, 0.00000);
  108. SetObjectMaterial(ob20, 0, 2231, "cj_hi_fi2", "CJ_SPEAKER3");
  109. AttachObjectToVehicle(ob2, GetPlayerVehicleID(playerid), -0.45210, -3.88210, -0.29220, 0.0, 0.0, 0.0);//1793
  110. AttachObjectToVehicle(ob3, GetPlayerVehicleID(playerid),-0.37950, -1.15080, 0.37990, -90.0, 0.0, 0.0);//1961
  111. AttachObjectToVehicle(ob5, GetPlayerVehicleID(playerid), 0.48330, -1.70080, 0.34810, 90.0, 0.0, 0.0);//1844
  112. AttachObjectToVehicle(ob6, GetPlayerVehicleID(playerid),0.04330, -1.70080, 0.34810, 90.0, 0.0, 0.0);//1844
  113. AttachObjectToVehicle(ob7, GetPlayerVehicleID(playerid),-0.39670, -1.70080, 0.34810, 90.0, 0.0, 0.0);//1844
  114. AttachObjectToVehicle(ob11, GetPlayerVehicleID(playerid),0.42388, -1.19945, 0.37990, -90.0, 0.0, 0.0);//1961
  115. AttachObjectToVehicle(ob12, GetPlayerVehicleID(playerid),-0.37040, -2.21100, 0.37990, -90.0, 0.0, 0.0);//1961
  116. AttachObjectToVehicle(ob13, GetPlayerVehicleID(playerid),0.41050, -2.20910, 0.37990, -90.0, 0.0, 0.0);//1961
  117. AttachObjectToVehicle(ob14, GetPlayerVehicleID(playerid),-0.60740, -3.64590, -0.26170, 0.0, 0.0, 0.0);//2633
  118. AttachObjectToVehicle(ob15, GetPlayerVehicleID(playerid),0.63620, -3.65090, -0.26170, 0.0, 0.0, 0.0);//2263
  119. AttachObjectToVehicle(ob16, GetPlayerVehicleID(playerid),0.01410, -3.65250, -0.26170, 0.0, 0.0, 0.0);//2263
  120. AttachObjectToVehicle(ob17, GetPlayerVehicleID(playerid),-0.38050, -2.99620, 0.40810, -90.0, 0.0, 0.0);//1945
  121. AttachObjectToVehicle(ob18, GetPlayerVehicleID(playerid),-0.06050, -2.99620, 0.40810, -90.0, 0.0, 0.0);//1945
  122. AttachObjectToVehicle(ob19, GetPlayerVehicleID(playerid),0.23950, -2.99620, 0.40810, -90.0, 0.0, 0.0);//1945
  123. AttachObjectToVehicle(ob20, GetPlayerVehicleID(playerid),0.53950, -2.99620, 0.40810, -90.0, 0.0, 0.0);//1945
  124. ChangeVehicleColor(vehicleid,6,0);
  125. }
  126. return 1;
  127. }
  128. public OnObjectMoved(objectid)
  129. {
  130. DestroyObject(objectid);
  131. return 1;
  132. }
Advertisement
Add Comment
Please, Sign In to add comment