[Ajuda] Gente me ajuda com esse sistema de som
#1

gente ta aqui eu to com 2 sistema que foi feito por min so as radios que nao e esse de radios pega tudo certo mais й so eu que ouvo a musica o que tem de errado com ele ?
PHP Code:
#include <a_samp>
#define Radios 100
#define AMARELO_FFC          0xFFFF00AA
//-------------------------------------------------
new Float:XFloat:YFloat:ZFloat:Distance 30.0;
public 
OnFilterScriptInit()
{
        print(
"** Webs Radios By:[FFC]Twister Carregado Com Sucesso");
        return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
        if(
dialogid ==Radios)
        {
        if(
response)
        {
//Radio Stronda
        
if(listitem == 0)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Stronda Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Stronda Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://65.60.15.180:8080/"XYZDistance1);
        return 
1;
        }
        
//Radio Nova Web
        
if(listitem == 1)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Nova Web Sintonizada");
        
GameTextForPlayer(playerid,"~y~Radio NovaWeb Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://69.162.90.148:7080/"XYZDistance1);
        return 
1;
        }
        
//Radio FFC
        
if(listitem == 2)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio FFC Sintonizada");
        
GameTextForPlayer(playerid,"~Y~Radio FFC Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://184.154.37.136:8087/"XYZDistance1);
        return 
1;
        }
        
//Radio Extremo Mix
        
if(listitem == 3)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Extremo Mix Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Extremo Mix Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://184.154.37.136:8083/"XYZDistance1);
        return 
1;
        }
        
//Radio Mantiquera
        
if(listitem == 4)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Mantiquera Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Mantiquera Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://184.154.37.136:8081/"XYZDistance1);
        return 
1;
        }
        
//Click Mix
        
if(listitem == 5)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Click mix Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Click Mix Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://50.30.33.114:9998"XYZDistance1);
        return 
1;
        }
        
//Web Radio Virtual Dj
        
if(listitem == 6)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Virtual Dj Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Virtual Dj Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://173.212.197.233:7800"XYZDistance1);
        return 
1;
        }
        
//Radio Vto Mix
        
if(listitem == 7)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Vto Mix Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Vto Mix Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://s3.voscast.com:7554/"XYZDistance1);
        return 
1;
        }
        
//Radio Team Expert
        
if(listitem == 8)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Team Expert Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Team Expert Sintonizada",5000,3);
        
PlayAudioStreamForPlayer("http://64.31.30.91:9980"XYZDistance1);
        return 
1;
        }
        
//Radio Relax
        
if(listitem == 9)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Relax Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Relax Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://streaming18.brlogic.com:8204/live"XYZDistance1);
        return 
1;
        }
        
//Radio Novo Milenio
        
if(listitem == 10)
        {
        
SendClientMessage(playeridAMARELO_FFC"Radio Novo Milenio Sintonizada");
        
GameTextForPlayer(playerid,"~w~Radio Novo Milenio Sintonizada",5000,3);
        
PlayAudioStreamForPlayer(playerid"http://174.142.79.66:8110"XYZDistance1);
        return 
1;
        }
        if(
listitem == 11)
        {
        
GameTextForPlayer(playerid,"~w~Radio Desligada Com Sucesso!",5000,3);
        
StopAudioStreamForPlayer(playerid);
        return 
1;
        }
        return 
1;
        }
        return 
1;
        }
        return 
1;
    }
new 
NaoFloda[MAX_PLAYERS];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/ligarsom"true))
    {
        if(
NaoFloda[playerid] == 0)
        {
            for(new 
0MAX_PLAYERSi++)
            {
                
GetPlayerPos(playeridXYZ);
                if(
IsPlayerInRangeOfPoint(i30.0XYZ))
                {
                
NaoFloda[playerid] = 1;
                
ShowPlayerDialog(playeridRadiosDIALOG_STYLE_LIST,
                
"Web Radios By:[FFC]Twister",
                
"{ADFF2F} Stronda \n{CAE1FF}Nova Web\n{7B68EE}Radio FFC\nRadio Extremo Mix\n{912CEE}Radio Mantiquera\n{CD5C5C}Click Mix\nWeb Radio Virtual Dj\n{F900E0}Radio Vto Mix\nRadio Team Expert\nWeb Radio Relax\nRadio Novo Milenio\n{FFFFFF}Desligar Radio",
                
"Sintonizar""Nao Sintoniza");
                }
            }
        }
        return 
true;
    }
    if(!
strcmp(cmdtext"/desligarsom"true))
    {
        for(new 
0MAX_PLAYERSi++)
        {
            
GetPlayerPos(playeridXYZ);
            if(!
IsPlayerInRangeOfPoint(i30.0XYZ))
            {
                
NaoFloda[playerid] = 0;
                
StopAudioStreamForPlayer(i);
            }
        }
        return 
true;
        }
    return 
false;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
        
// If the player exits a vehicle
    
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        
StopAudioStreamForPlayer(playerid); // Stop the audio stream
    
}
    return 
1;
}
//sitema de Web Radio Samp 3D By:[FFC]Twister 
ja esse pega tudo certo muita gente ouve mais e so uma musica me ajuda porfavor ae ele
PHP Code:
#include <a_samp>
public OnFilterScriptInit()
{
    return 
true;
}
public 
OnFilterScriptExit()
{
    return 
true;
}
public 
OnPlayerConnect(playerid)
{
    return 
true;
}
new 
NaoFloda[MAX_PLAYERS];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/ligarsom"true))
    {
        new 
Float:XFloat:YFloat:ZFloat:Distance 30.0;
        if(
NaoFloda[playerid] == 0)
        {
            for(new 
0MAX_PLAYERSi++)
            {
                
GetPlayerPos(playeridXYZ);
                if(
IsPlayerInRangeOfPoint(i30.0XYZ))
                {
                
NaoFloda[playerid] = 1;
                
PlayAudioStreamForPlayer(i"http://dl.dropboxusercontent.com/s/wkq9pvf6dsgraz4/MC_Marcelly_Bigode_Grosso__CLIPE_OFICIAL__TOM_PRODU_ES_2013.mp3"XYZDistance1);
                }
            }
        }
        return 
true;
    }
    if(!
strcmp(cmdtext"/desligarsom"true))
    {
        new 
Float:XFloat:YFloat:Z;
        for(new 
0MAX_PLAYERSi++)
        {
            
GetPlayerPos(playeridXYZ);
            if(!
IsPlayerInRangeOfPoint(i30.0XYZ))
            {
                
NaoFloda[playerid] = 0;
                
StopAudioStreamForPlayer(i);
            }
        }
        return 
true;
        }
    return 
false;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
        
// If the player exits a vehicle
    
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        
StopAudioStreamForPlayer(playerid); // Stop the audio stream
    
}
    return 
1;

Reply
#2

Nгo intendi qual a dificuldade de usar uma dialog ?
Reply
#3

Cria a loop nos dialog's nгo no comando.
Ex:
pawn Code:
if(listitem == 1)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SendClientMessage(i, AMARELO_FFC, "Radio Nova Web Sintonizada");
        GameTextForPlayer(i,"~y~Radio NovaWeb Sintonizada",5000,3);
        PlayAudioStreamForPlayer(i, "http://69.162.90.148:7080/", X, Y, Z, Distance, 1);
    }
    return 1;
}
Acho que assim funciona, nгo testei porque tenho que ir para escola.
Reply
#4

pawn Code:
#include <a_samp>

static bool:NaoFloda[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/ligarsom", true))
    {
        if(NaoFloda[playerid] == false)
        {
            new Float:Pos[3];
            GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
            NaoFloda[playerid] = true;
            for(new i = 0; i <= GetMaxPlayers(); i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(IsPlayerInRangeOfPoint(i, 30.0, Pos[0], Pos[1], Pos[2]))
                    {
                        PlayAudioStreamForPlayer(i, "http://dl.dropboxusercontent.com/s/wkq9pvf6dsgraz4/MC_Marcelly_Bigode_Grosso__CLIPE_OFICIAL__TOM_PRODU_ES_2013.mp3", X, Y, Z, Distance, 1);
                    }
                }
            }
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/desligarsom", true))
    {
        if(NaoFloda[playerid] == false)
        {
            new Float:Pos[3];
            GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
            NaoFloda[playerid] = false;
            for(new i = 0; i <= GetMaxPlayers(); i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(IsPlayerInRangeOfPoint(i, 30.0, Pos[0], Pos[1], Pos[2]))
                    {
                        StopAudioStreamForPlayer(i)
                    }
                }
            }
        }
        return 1;
    }
    return 0;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        StopAudioStreamForPlayer(playerid);
    }
    return 1;
}
?

Nгo entendo muito Portuguкs :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)