Song for all
#1

How to make a song for all??Like a cmd and when type the cmd to play a song for everybody
Reply
#2

here, good luck (;
Reply
#3

Ok, we can start off simply.

Код:
COMMAND:wawmusic(playerid, params[])
{
	PlayAudioStreamForPlayer(playerid, *PUT URL HERE*");
	SendClientMessage(playerid, COLOR_BLUE, "[INFO] You Have turned waw music on!");
	return 1;
}
Reply
#4

i need for all players i know that
Reply
#5

Код:
stock PlayAudioStreamForAll(url[])
{
    for(new i; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected( i ))
        {
            PlayAudioStreamForPlayer(i, url, x, y, z, distance);
        }
    }
    return 1;
   
}
stock StopAudioStreamForAll(url[])
{
    for(new i; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected( i ))
        {
             StopAudioStreamForPlayer(playerid);
        }
    }
    return 1;
   
}
YCMD:stopmusic(playerid, params[], help)
{
#pragma unused params
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Stops audio for everyone.");
    }
    else
    {
        new
            str[32];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/stopmusic\"";
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            StopAudioStreamForPlayer(playerid);
        }
    }
    return 1;
}
YCMD:music(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Plays audio for everyone.");
    }
    else
    {
        new
            str[32];
        if (isnull(params))
        {
            format(str, sizeof (str), "Usage: \"/music [url]\"";
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            PlayAudioStreamForAll(params);
        }
    }
    return 1;
}
Here is what i use, ycmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)