14.07.2011, 15:07
https://sampwiki.blast.hk/wiki/SoundID
Try this, and this link is for Sounds ID.
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;
}