20.10.2010, 16:49
I was working on a command that plays a sound but I tired to make it only when the player who activated the sound could hear it and the players who are nearby him, it just doesn't work
this is my script, this is kinda bad, It doesn't play the sound sometimes to the player, and sometimes to everyone else.
this is my script, this is kinda bad, It doesn't play the sound sometimes to the player, and sometimes to everyone else.
pawn Код:
forward BoomSound( playerid );
public BoomSound( playerid )
{
new otherId;
new Float:x, Float:y, Float:z;
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerToPoint(15.0,otherId, x, y, z))
PlayerPlaySound(playerid, 1147, x, y, z);
PlayerPlaySound(otherId, 1147, x, y, z);
}
}

