How come you can't hear the explosion sound inside of an interior?
#1

I have an /akill (admin kill) command which makes an explosion sound for everyone when your in virtual world 0, but if you're in an interior, you don't hear any explosion and no one around hears it either. I used PlayerPlaySound with id 1159 (1159 = explosion sound) so the player getting killed hears it, but only he can hear it, no one else. How can I make the sound available so everyone can hear it in an interior?
Reply
#2

Make sure the explosion type to be created is a type which creates sound, however, if you can't get it to work after changing the type you can use the following snippet.

pawn Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
foreach(Player, i)
{
    // If is near the playerid within 20 range, and their interior is the same..
    if (IsPlayerInRangeOfPoint(i, 20, X, Y, Z) && (GetPlayerInterior(i) == GetPlayerInterior(playerid)))
    {
        // Play sound for 'i'.
    }
    return 0;
}
You might want to re-write it!
Reply
#3

Yes I use CreateExplosion but you can't hear it in an interior. Thanks I will try the snippet.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)