Playing sound with a weapon
#1

I'm wondering if there is a way to play sound when a weapon goes off.

So, for example; if I threw a grenade at say 3 people in a room, how would I make it so those 3 people the grenade was thrown at & damages hears a sound?

Thanks guys.
Reply
#2

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    return 1;
}
public OnPlayerGiveDamage(playerid,damagedid,Float:amount,weaponid)
{
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        return 1;
}
Find more info here: https://sampforum.blast.hk/showthread.php?tid=379416
Reply
#3

Got it. Worked out a way to calculate the damage of a grenade, you need to use the explosion ID rather than the grenade its self.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)