Advertisement
ZumeZero

[Filterscript] Buscador de sonidos SA:MP

Aug 6th, 2014
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.55 KB | None | 0 0
  1. // Buscador de sonidos SA:MP - Zume.
  2.  
  3. #include <a_samp>
  4.  
  5. #define DIALOGO_SONIDOS 240
  6. stock SonidosSAMP[][] =
  7. {
  8.     {1002, "SOUND_CEILING_VENT_LAND"},
  9.     {1009, "SOUND_BONNET_DENT"},
  10.     {1027, "SOUND_WHEEL_OF_FORTUNE_CLACKER"},
  11.     {1035, "SOUND_SHUTTER_DOOR_START"},
  12.     {1036, "SOUND_SHUTTER_DOOR_STOP"},
  13.     {1039, "SOUND_PARACHUTE_OPEN"},
  14.     {1052, "SOUND_AMMUNATION_BUY_WEAPON"},
  15.     {1053, "SOUND_AMMUNATION_BUY_WEAPON_DENIED"},
  16.     {1054, "SOUND_SHOP_BUY"},
  17.     {1055, "SOUND_SHOP_BUY_DENIED"},
  18.     {1056, "SOUND_RACE_321"},
  19.     {1057, "SOUND_RACE_GO"},
  20.     {1058, "SOUND_PART_MISSION_COMPLETE"},
  21.     {1062, "SOUND_GOGO_TRACK_START (music)"},
  22.     {1068, "SOUND_GOGO_TRACK_STOP (music)"},
  23.     {1063, "SOUND_DUAL_TRACK_START (music)"},
  24.     {1069, "SOUND_DUAL_TRACK_STOP (music)"},
  25.     {1076, "SOUND_BEE_TRACK_START (music)"},
  26.     {1077, "SOUND_BEE_TRACK_STOP (music)"},
  27.     {1083, "SOUND_ROULETTE_ADD_CASH"},
  28.     {1084, "SOUND_ROULETTE_REMOVE_CASH"},
  29.     {1085, "SOUND_ROULETTE_NO_CASH"},
  30.     {1095, "SOUND_BIKE_PACKER_CLUNK"},
  31.     {1097, "SOUND_AWARD_TRACK_START (music)"},
  32.     {1098, "SOUND_AWARD_TRACK_STOP (music)"},
  33.     {1100, "SOUND_MESH_GATE_OPEN_START"},
  34.     {1101, "SOUND_MESH_GATE_OPEN_STOP"},
  35.     {1130, "SOUND_PUNCH_PED"},
  36.     {1131, "SOUND_AMMUNATION_GUN_COLLISION"},
  37.     {1132, "SOUND_CAMERA_SHOT"},
  38.     {1133, "SOUND_BUY_CAR_MOD"},
  39.     {1134, "SOUND_BUY_CAR_RESPRAY"},
  40.     {1135, "SOUND_BASEBALL_BAT_HIT_PED"},
  41.     {1136, "SOUND_STAMP_PED"},
  42.     {1137, "SOUND_CHECKPOINT_AMBER"},
  43.     {1138, "SOUND_CHECKPOINT_GREEN"},
  44.     {1139, "SOUND_CHECKPOINT_RED"},
  45.     {1140, "SOUND_CAR_SMASH_CAR"},
  46.     {1141, "SOUND_CAR_SMASH_GATE"},
  47.     {1142, "SOUND_OTB_TRACK_START"},
  48.     {1143, "SOUND_OTB_TRACK_STOP"},
  49.     {1144, "SOUND_PED_HIT_WATER_SPLASH"},
  50.     {1145, "SOUND_RESTAURANT_TRAY_COLLISION"},
  51.     {1147, "SOUND_SWEETS_HORN"},
  52.     {1148, "SOUND_MAGNET_VEHICLE_COLLISION"},
  53.     {1149, "SOUND_PROPERTY_PURCHASED"},
  54.     {1150, "SOUND_PICKUP_STANDARD"},
  55.     {1153, "SOUND_GARAGE_DOOR_START"},
  56.     {1154, "SOUND_GARAGE_DOOR_STOP"},
  57.     {1163, "SOUND_PED_COLLAPSE"},
  58.     {1165, "SOUND_SHUTTER_DOOR_SLOW_START"},
  59.     {1166, "SOUND_SHUTTER_DOOR_SLOW_STOP"},
  60.     {1169, "SOUND_RESTAURANT_CJ_PUKE"},
  61.     {1183, "SOUND_DRIVING_AWARD_TRACK_START (music)"},
  62.     {1184, "SOUND_DRIVING_AWARD_TRACK_STOP"},
  63.     {1185, "SOUND_BIKE_AWARD_TRACK_START (music)"},
  64.     {1186, "SOUND_BIKE_AWARD_TRACK_STOP"},
  65.     {1187, "SOUND_PILOT_AWARD_TRACK_START (music)"},
  66.     {1188, "SOUND_PILOT_AWARD_TRACK_STOP"},
  67.     {1190, "SOUND_SLAP"}
  68. };
  69. new SonidosArray[MAX_PLAYERS][sizeof(SonidosSAMP)];
  70.  
  71. main()
  72. {
  73. }
  74.  
  75. public OnPlayerCommandText(playerid, cmdtext[])
  76. {
  77.     if (strcmp("/sonidos", cmdtext, true, 10) == 0)
  78.     {
  79.         for(new s = 0; s < sizeof(SonidosSAMP); s++)
  80.         {
  81.             SonidosArray[playerid][s] = -1;
  82.         }
  83.         new S_[128], X_[2500], art = 0;
  84.         for (new x = 0; x < sizeof(SonidosSAMP); x++)
  85.         {
  86.             if(art < sizeof(SonidosSAMP))
  87.             {
  88.                 format(S_, sizeof(S_), "%s - %d\n", SonidosSAMP[x][1], SonidosSAMP[x][0]);
  89.                 strcat(X_, S_);
  90.                 SonidosArray[playerid][art] = x;
  91.                 art++;
  92.             }
  93.         }
  94.         ShowPlayerDialog(playerid, DIALOGO_SONIDOS, DIALOG_STYLE_LIST, "Buscador de sonidos SA:MP.", X_, "Reproducir", "Salir");
  95.         return 1;
  96.     }
  97.     return 0;
  98. }
  99.  
  100. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  101. {
  102.     switch(dialogid)
  103.     {
  104.         case DIALOGO_SONIDOS:
  105.         {
  106.             if(response)
  107.             {
  108.                 new Float:p_[3];
  109.                 GetPlayerPos(playerid, p_[0], p_[1], p_[2]);
  110.                 PlayerPlaySound(playerid, 1186, p_[0], p_[1], p_[2]);
  111.                 PlayerPlaySound(playerid, SonidosSAMP[SonidosArray[playerid][listitem]][0], p_[0], p_[1], p_[2]);
  112.             }
  113.         }
  114.     }
  115.     return 1;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement