PlayAudioStreamForPlayer for everyone in a certain range
#1

How would I make it so it plays not just for me but EVERYONE within the certain range. Not globally just within the range I put it ?

Код:
PlayAudioStreamForPlayer
Reply
#2

If (IsPlayerInRange(playerid, x, y, z)) "do something"
maybe This will help you
Reply
#3

Not really. Anyone else help ?
Reply
#4

pawn Код:
PlayAudioStreamForPlayer( playerid, (playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
You change distance to the range, insert the coordenates in posX, posY and posZ and use 1 in the last argument.
Reply
#5

Код:
PlayAudioStreamForPlayer( playerid, (playerid, inputtext, aX, aY, aZ, range, 1)
Something like that ?
Reply
#6

meabe you want for all players xd

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    PlayAudioStreamForPlayer(i, "http://24.media.v4.skyrock.net/music/245/dcd/245dcdbcbc5b0e5b2f89c26fc1eed062.mp3");
}
Example link.
Reply
#7

For example if you are playing a link that is inserted in a dialog you do this
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos( playerid, x, y, z );
PlayAudioStreamForPlayer( playerid, inputtext, x, y, z, 30, 1 ); // 30 meters
Reply
#8

yep it gives me a error

Код:
error 035: argument type mismatch (argument 2)
Reply
#9

I want it for all players within a range of 30.0. How would we make that work ?
Reply
#10

yes but If a player connects after your command, the old playerid (i) Work always for PlayAudioStreamForPlayer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)