Question
#1

How can i make a song to be heard only in one region ?
Reply
#2

PlayAudioStreamForPlayer with the parameters distance, and range.

Such as

PHP код:

for(new 0MAX_PLAYERSp++)
{
      if(!
IsPlayerConnected(p)) continue;
      
PlayAudioStreamForPlayer(i"your_sound_url"0.00.00.020.01);

Will play a sound for all the players in range of 20 unities from the center of the map (blueberry farm)
Reply
#3

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

If you look closely at the parameters -



The 3rd, 4th and 5th parameters are the co-ordinates where you'd like the song to be heard, the 6th param is the distance & the 7th should be 'true' when you WANT to play it at the co-ordinates. (Make sure usepos IS true if you want the effect to even take place)

EDIT: Late
Reply
#4

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
PlayAudioStreamForPlayer with the parameters distance, and range.

Such as

PHP код:

for(new 0MAX_PLAYERSp++)
{
      if(!
IsPlayerConnected(p)) continue;
      
PlayAudioStreamForPlayer(i"your_sound_url"0.00.00.020.01);

Will play a sound for all the players in range of 20 unities from the center of the map (blueberry farm)
ty bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)