Audio problem
#1

When i enter any vehicle a song (music) starts and goes on AUTOMATICALLY without any commands or anything i have two commands in my script for songs: /setstation and /music but /setstation doesn't do something but /music it turns the song off for a second then it comes back
Reply
#2

Maybe it is a filterscript with music build in also? If it is like that try deleting it!

/music may be the cmd to turn it on?
Reply
#3

I don't have ANY filterscript until now and here is the /music CMD:
pawn Код:
CMD:music(playerid, params[])
{
    if(PlayerInfo[playerid][pCDPlayer])
    {
        new choice[32];
        if(sscanf(params, "s[32]", choice))
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /music [name]");
            SendClientMessageEx(playerid, COLOR_GREY, "Available names: On, Off, Next");
            return 1;
        }

        if(strcmp(choice,"on",true) == 0)
        {
            GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~CD Player On", 5000, 5);
            new channel = Music[playerid];
            PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
        }
        else if(strcmp(choice,"off",true) == 0)
        {
            GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~CD Player Off", 5000, 5);
            PlayerFixRadio(playerid);
        }
        else if(strcmp(choice,"next",true) == 0)
        {
            if(Music[playerid] == 0) { Music[playerid] = 1; }
            else if(Music[playerid] == 1) { Music[playerid] = 2; }
            else if(Music[playerid] == 2) { Music[playerid] = 3; }
            else if(Music[playerid] == 3) { Music[playerid] = 4; }
            else if(Music[playerid] == 4) { Music[playerid] = 5; }
            else if(Music[playerid] == 5) { Music[playerid] = 6; }
            else if(Music[playerid] == 6) { Music[playerid] = 0; }
            new channel = Music[playerid];
            PlayerPlaySound(playerid, Songs[channel][0], 0.0, 0.0, 0.0);
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   Unknown music command!");
            return 1;
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "   You don't have a CD-Player!");
        return 1;
    }
    return 1;
}
Reply
#4

Test "/music off" then? I guess you've already tested.
Reply
#5

i tested it and turns off the music and after 1 second the music starts again!!
Reply
#6

You maybe have an FS with the same commands?
Reply
#7

Maybe it's only you lagging?
Reply
#8

I don't think so because i don't have any FS until now and also my internet speed is 1024 KBPS and i am only alone in my server so how lagging ?
N.B.: me alone is ping 15-20
Reply
#9

I've had trouble with stuff like that, it may come from your returns. Try adding return 1; at the end of each if/else statement.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)