PlayAudioStreamForPlayer for everyone in a certain range -
ShawnMiller1337 - 21.01.2012
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
Re: PlayAudioStreamForPlayer for everyone in a certain range -
vakhtang - 21.01.2012
If (IsPlayerInRange(playerid, x, y, z)) "do something"
maybe This will help you
Re: PlayAudioStreamForPlayer for everyone in a certain range -
ShawnMiller1337 - 21.01.2012
Not really. Anyone else help ?
Re: PlayAudioStreamForPlayer for everyone in a certain range -
admantis - 21.01.2012
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.
Re: PlayAudioStreamForPlayer for everyone in a certain range -
ShawnMiller1337 - 21.01.2012
Код:
PlayAudioStreamForPlayer( playerid, (playerid, inputtext, aX, aY, aZ, range, 1)
Something like that ?
Respuesta: PlayAudioStreamForPlayer for everyone in a certain range -
[Nikk] - 21.01.2012
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.
Re: PlayAudioStreamForPlayer for everyone in a certain range -
admantis - 21.01.2012
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
Re: PlayAudioStreamForPlayer for everyone in a certain range -
ShawnMiller1337 - 21.01.2012
yep it gives me a error
Код:
error 035: argument type mismatch (argument 2)
Re: PlayAudioStreamForPlayer for everyone in a certain range -
ShawnMiller1337 - 21.01.2012
I want it for all players within a range of 30.0. How would we make that work ?
Re : PlayAudioStreamForPlayer for everyone in a certain range -
ombre - 21.01.2012
yes but If a player connects after your command, the old playerid (i) Work always for PlayAudioStreamForPlayer?