Sound is supposed to be played at a certain position
#6

https://sampwiki.blast.hk/wiki/SoundID
Try this, and this link is for Sounds ID.
pawn Код:
new SoundTimer[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid) {
    SoundTimer[playerid] = SetTimer("SoundTimer", 1000, true);
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid) {
    KillTimer(SoundTimer[playerid]);
    return 1;
}
pawn Код:
forward SoundTimerFunc();
public SoundTimerFunc() {
    for(new i; i < MAX_PLAYERS; i++) {
        if(IsPlayerInRangeOfPoint(i, DISTANCE, X, Y, Z)) { // Change your X, Y, Z and distance.
            PlayerPlaySound(i, SoundID, 0.0, 0.0, 0.0); // Change your SoundID to a specific ID, posted a link.
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)