[Ajuda] sistema de som
#1

Quote:
Originally Posted by LuxurioN™
View Post
Todos os tуpicos que estiverem a infringir alguma regra serгo excluнdos sem aviso prйvio.

Regras:
  • [...]
  • Nгo й permitido "Double Post" (Postagem dupla) antes de 24 horas. Existe um botгo chamado "Editar" .
  • [...]
fala ae vinho aqui pedi uma ajuda de como arumar esse sistema aqui:

1:eu queria po tipo um anuncio de radios pra vazer varias escolhas q esse so tem uma musica

2:ele ta meio bugado quando entro no carro continuoolvino ai saio do carro a musica para

3:quando digito /desligarsom ele nao desliga tipo se eu nao digitar /desligarsom ele nao libera pra min ligar e tanbem nao desliga

me ajuda ai por favor

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


Messages In This Thread
sistema de som - by zDbruno - 11.03.2014, 15:16
Re: sistema de som - by yNexus - 11.03.2014, 15:46
Re: sistema de som - by JonathanFeitosa - 11.03.2014, 16:36
Re: sistema de som - by zDbruno - 11.03.2014, 16:40
Re: sistema de som - by JonathanFeitosa - 11.03.2014, 16:49
Re: sistema de som - by zDbruno - 11.03.2014, 16:53
Re: sistema de som - by zDbruno - 11.03.2014, 16:55
Re: sistema de som - by zDbruno - 11.03.2014, 17:19

Forum Jump:


Users browsing this thread: 1 Guest(s)