Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************************************************
- Script Name: Sistema de Som Automotivo
- Script Version: 0.1a
- Script Dev: Matheus Vieira (Cidiei)
- WhoPawn Copyright 2014
- *******************************************************************************/
- #define FILTERSCRIPT
- /******************************************************************************/
- #include <a_samp>
- /******************************************************************************/
- #if defined FILTERSCRIPT
- /******************************************************************************/
- public OnFilterScriptInit(){
- print("Sistema carregado...");
- return 1;
- }
- /******************************************************************************/
- public OnFilterScriptExit(){
- return 1;
- }
- /******************************************************************************/
- public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
- {
- switch(dialogid)
- {
- case 11:{
- if(response)
- {
- if(!strlen(inputtext))
- {
- SendClientMessage(playerid,-1,"Nenhum url foi digitado na input!");
- return 0;
- }
- new Float:Pos[3];
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- for(new i = 0; i <MAX_PLAYERS; i++)
- {
- if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2]))
- {
- PlayAudioStreamForPlayer(i,inputtext);
- }
- }
- }
- else return 0;
- }
- }
- return 1;
- }
- /******************************************************************************/
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- /*Área de Comandos*/
- if(strcmp(cmdtext,"/tocarsom", true)==0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"Você não está em um veículo!");
- ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Radio","Cole aqui o endereço do audio.","Tocar","Cancelar");
- return 1;
- }
- /*Parar Audio*/
- if(strcmp(cmdtext,"/pararaudio", true)==0)
- {
- new Float:Pos[3];
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- for(new i = 0; i <MAX_PLAYERS; i++)
- {
- if(IsPlayerInRangeOfPoint(i,10.0,Pos[0],Pos[1],Pos[2]))
- {
- StopAudioStreamForPlayer(playerid);
- }
- }
- return 1;
- }
- return 1;
- }
- /******************************************************************************/
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement