Music play for all
#4

He asked specifically for a command where you type "/music URL" ingame, so you choose your music without having to edit it in the script.

pawn Код:
CMD:music(playerid, params[])
{
    new url[128];
    if(sscanf(params,"s[128]",url)) return SendClientMessage(playerid,-1,"USAGE: /music (url)");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            PlayAudioStreamForPlayer(i, url);
        }
        return 1;
}
Or if you want it for RCON only:

pawn Код:
CMD:music(playerid, params[])
{
    if(!PlayerIsAdmin(playerid)) return SendClientMessage(playerid,-1,"ERROR: Only administrators may use this command.");
    {
        new url[128];
        if(sscanf(params,"s[128]",url)) return SendClientMessage(playerid,-1,"USAGE: /music (url)");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                PlayAudioStreamForPlayer(i, url);
            }
    }
        return 1;
}
Reply


Messages In This Thread
Music play for all - by Hostoxide - 26.12.2014, 18:14
Re: Music play for all - by HY - 26.12.2014, 18:31
Re: Music play for all - by AlexSwezVotra - 26.12.2014, 18:32
Re: Music play for all - by jackx3rx - 26.12.2014, 19:15

Forum Jump:


Users browsing this thread: 2 Guest(s)