Sound System
#1

Putting sound system, in a certain place, like putting a sound playing in the slum, who are in shanty town will hear the sound that the player colocae, and that is not in the favela can not hear.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=102865 - Dynamic Areas
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer - Play Audio stream
Reply
#3

To play a sound in a specific area, you must first get the coordinates of the area you want the sound to play in.

Then add;
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);

X,Y,Z being the coordinates you chose..
Then distance being how big of a radius the place is.

To read more on PlayAudioStreamForPlayer goto https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Reply
#4

Can anyone help me create this system, I am newbie
Reply
#5

pawn Код:
#include a_samp
#include streamer // For Dynamics
new YourVariable;
public OnGameModeInit()
{
   
    YourVariable = CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
    return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
    if(areaid == YourVariable )
    {
        PlayAudioStreamForPlayer(playerid, "http://mp3dos.com/assets/songs/15000-15999/15726-am-i-wrong-nico-vinz--1411219503.mp3");

        SetPlayerTime(playerid,24,0);
    }

    return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
    if(areaid == YourVariable )
    {
        SetPlayerTime(playerid,8,0);
        StopAudioStreamForPlayer(playerid);
    }
    return 1;
}
Reply
#6

@gurmani11 - That will work fine.
Reply
#7

ty mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)