Audio stream for all
#1

Quote:

if(strcmp(cmdtext, "/radioparty2", true) == 0)
{
if(!IsPlayerLuxAdminLevel(playerid, 3)) return SendClientMessage(playerid, 0xff0000a7, "Tev vajag 3. limena adminu lai ieslegtu radio {FFFFFF}ADMIN PARTY{FF0000} !");
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayAudioStreamForPlayer(playerid, "URL", x, y, z, 25.0, 1);
return 1;
}

How can i make it for all players?
Reply
#2

PlayAudioStreamForPlayer(playerid, url[], FloatosX, FloatosY, FloatosZ , Float:distance, usepos)

Use that instead of PlayAudioForPlayer
Reply
#3

Код:
CMD:radioparty2(playerid,params[])
{
    if(!IsPlayerLuxAdminLevel(playerid, 3))  return SendClientMessage(playerid, 0xff0000a7, "Tev vajag 3. limena adminu lai ieslegtu radio {FFFFFF}ADMIN PARTY{FF0000} !");
    {
        new url[200];
        if(sscanf(params,"s[200]", url)) return SendClientMessage(playerid, 0x9C9C9CAA,"Syntax: /radioparty2[url]");
        foreach(new i: Player)
        {
            PlayAudioStreamForPlayer(i, url);
        }
    }
    return 1;
}
Try it.
Reply
#4

You Forget to change "playerid" to
PHP код:
        foreach(new Player)
        {
            if(
!= playerid)
            {
                
PlayAudioStreamForPlayer(i,"url"x,y,z,25.0,1);//"i" = AllPlayer 
Dont Forget to Use
PHP код:
#include <foreach>//on your top script 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)