Audio problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Audio problem (
/showthread.php?tid=389803)
Audio problem -
Red_Dragon. - 03.11.2012
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
Re: Audio problem -
Drake_Lopez - 03.11.2012
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?
Re: Audio problem -
Red_Dragon. - 03.11.2012
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;
}
Re: Audio problem -
Drake_Lopez - 03.11.2012
Test "/music off" then? I guess you've already tested.
Re: Audio problem -
Red_Dragon. - 03.11.2012
i tested it and turns off the music and after 1 second the music starts again!!
Re: Audio problem -
Drake_Lopez - 04.11.2012
You maybe have an FS with the same commands?
Re: Audio problem -
Drake_Lopez - 04.11.2012
Maybe it's only you lagging?
Re: Audio problem -
Red_Dragon. - 04.11.2012
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
Re : Audio problem -
69 - 04.11.2012
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.