Audio Help - 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 Help (
/showthread.php?tid=420638)
Audio Help -
DerickClark - 06.03.2013
Help how to block the url + make that admin command.
i put it on level 5 Still not working. Olny high admin or 5 can use it.
Код:
COMMAND:audio(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 5)
if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,0xFF0000AA,"USAGE:/audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,0xFF6347FF,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(0xFF6347FF, cmdstr);
// Let the server know that this was a valid command
return 1;
}
Re: Audio Help -
[MG]Dimi - 06.03.2013
pawn Код:
COMMAND:audio(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 5)
{
if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,0xFF0000AA,"USAGE:/audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,0xFF6347FF,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(0xFF6347FF, cmdstr);
// Let the server know that this was a valid command
}
return 1;
}
Re: Audio Help -
DerickClark - 06.03.2013
Thanks can you do dis one?
Код:
COMMAND:stopaudio(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 5)
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
StopAudioStreamForPlayer(i);
}
SendClientMessage(playerid,0xFF6347FF,"You have stopped all audio streaming for players.");
format(cmdstr, sizeof(cmdstr), "Admin %s has stopped all playing audio streams", FormatName(playerid));
SendClientMessageToAll(0xFF6347FF, cmdstr);
// Let the server know that this was a valid command
return 1;
}