Advertisement
zLevi_

Sistema de som automotivo

Sep 17th, 2021
1,336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. /*******************************************************************************
  2. Script Name: Sistema de Som Automotivo
  3. Script Version: 0.1a
  4. Script Dev: Matheus Vieira (Cidiei)
  5.  
  6. WhoPawn Copyright 2014
  7. *******************************************************************************/
  8. #define FILTERSCRIPT
  9. /******************************************************************************/
  10. #include <a_samp>
  11. #include <zcmd>
  12. /******************************************************************************/
  13. #if defined FILTERSCRIPT
  14. /******************************************************************************/
  15. public OnFilterScriptInit(){
  16. print("Sistema carregado...");
  17. return 1;
  18. }
  19. /******************************************************************************/
  20. public OnFilterScriptExit(){
  21. return 1;
  22. }
  23. /******************************************************************************/
  24. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[]){
  25. switch(dialogid){
  26. case 11:{
  27. if(response){
  28. if(!strlen(inputtext)){
  29. SendClientMessage(playerid,-1,"Nenhum url foi digitado na input!");
  30. return 0;
  31. }
  32. new Float:Pos[3];
  33. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  34. for(new i = 0; i <MAX_PLAYERS; i++){
  35. if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2])){
  36. PlayAudioStreamForPlayer(i,inputtext);
  37. }
  38. }
  39. }else{
  40.  
  41. }
  42. }
  43. }
  44. return 1;
  45. }
  46. /******************************************************************************/
  47. /*Área de Comandos*/
  48. CMD:tocarsom(playerid,params[]){
  49. if(!IsPlayerInAnyVehicle(playerid))
  50. return SendClientMessage(playerid,-1,"Você não está em um veículo!");
  51. ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Radio","Cole aqui o endereço do audio.","Tocar","Cancelar");
  52. return 1;
  53. }
  54. /*Parar Audio*/
  55. CMD:pararaudio(playerid){
  56. new Float:Pos[3];
  57. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  58. for(new i = 0; i <MAX_PLAYERS; i++){
  59. if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2])){
  60. StopAudioStreamForPlayer(playerid);
  61. }
  62. }
  63. return 1;
  64. }
  65. /******************************************************************************/
  66. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement