Audio for players in stream.
#1

Hi.
When i was done scripting this, errors popped up and i dont know what to do.
I tried #pragma unused params but i guess it wont work
Somebody, help?
PHP код:
else if(!strcmp(cmd"/playmusic"true))
    {
    foreach(
Playeri)
    {
        if(
PlayerInfo[playerid][pAdmin] < 1) return MSG_NOADMIN1(playerid);
        if(
IsPlayerInRangeOfPoint(playerid10.0260.4326,-1809.4899,6.9791))
        {
            if(
isnull(params)) return SendClientMessage(playeridCOLOR_WHITE"Ievadi: /playmusic [Link]");
            new 
Float:XFloat:YFloat:ZFloat:Distance 80.0;
            
GetPlayerPos(playeridXYZ);
            
PlayAudioStreamForPlayer(i"params"XYZDistance1);
        }
    }
    return 
1;
    } 
Errors im getting:
Код HTML:
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9804) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9808) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9808) : error 029: invalid expression, assumed zero
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9808) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9808) : fatal error 107: too many error messages on one line
Reply
#2

Try this:
PHP код:
CMD:playmusic(playeridparams[]) 

        if(
IsPlayerInRangeOfPoint(playerid10.0260.4326,-1809.4899,6.9791))  
        {  
            if(
isnull(params)) return SendClientMessage(playerid,0xf8f8f8fff"Syntax: {FFFFFF}/playmusic <Link>"); 
            foreach(
Playeri)   
            { 
                
PlayAudioStreamForPlayer(iparams); 
            } 
        } 
        return 
1

EDIT: you're doing right, just include params as it is without " "
Reply
#3

Actually thats not what i need.
I need it to stream to closest players. like float:distance 80.0
Reply
#4

This:

PHP код:
else if(!strcmp(cmd"/playmusic"true)) 
    { 
    foreach(
Playeri
    { 
        if(
PlayerInfo[playerid][pAdmin] < 1) return MSG_NOADMIN1(playerid); 
        if(
IsPlayerInRangeOfPoint(playerid10.0260.4326,-1809.4899,6.9791)) 
        { 
            if(
isnull(params)) return SendClientMessage(playeridCOLOR_WHITE"Ievadi: /playmusic [Link]"); 
            new 
Float:XFloat:YFloat:ZFloat:Distance 80.0
            
GetPlayerPos(playeridXYZ); 
            
PlayAudioStreamForPlayer(iparamsXYZDistance1); 
        } 
    } 
    return 
1
    } 
Reply
#5

Код HTML:
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9807) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9807) : error 029: invalid expression, assumed zero
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9807) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9807) : fatal error 107: too many error messages on one line
Reply
#6

Код:
CMD:playmusic(playerid, params[])
{
        if(PlayerInfo[playerid][pAdmin] < 1) return MSG_NOADMIN1(playerid);
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 260.4326,-1809.4899,6.9791))
        {
            if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Ievadi: /playmusic [Link]");
            foreach(Player, i)
            {
            new Float:X, Float:Y, Float:Z, Float:Distance = 80.0;
            GetPlayerPos(playerid, X, Y, Z);
            PlayAudioStreamForPlayer(i, params, X, Y, Z, Distance, 1);
            }
        }
        return 1;
}
try this
Reply
#7

Quote:
Originally Posted by UFF
Посмотреть сообщение
Код:
CMD:playmusic(playerid, params[])
{
        if(PlayerInfo[playerid][pAdmin] < 1) return MSG_NOADMIN1(playerid);
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 260.4326,-1809.4899,6.9791))
        {
            if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Ievadi: /playmusic [Link]");
            foreach(Player, i)
            {
            new Float:X, Float:Y, Float:Z, Float:Distance = 80.0;
            GetPlayerPos(playerid, X, Y, Z);
            PlayAudioStreamForPlayer(i, params, X, Y, Z, Distance, 1);
            }
        }
        return 1;
}
try this
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 029: invalid expression, assumed zero
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : fatal error 107: too many error messages on one line
Reply
#8

Quote:
Originally Posted by Mill
Посмотреть сообщение
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 029: invalid expression, assumed zero
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : error 017: undefined symbol "params"
C:\Users\Lietotājs\Desktop\GAPS\GM\LS-RP\gamemodes\tactic.pwn(9805) : fatal error 107: too many error messages on one line
9805 - Show this line
Reply
#9

Quote:
Originally Posted by UFF
Посмотреть сообщение
9805 - Show this line
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Ievadi: /playmusic [Link]");
Reply
#10

Someone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)