SA-MP Forums Archive
"Ding"-Sound when you make/get Damage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: "Ding"-Sound when you make/get Damage (/showthread.php?tid=379416)



"Ding"-Sound when you make/get Damage - Saize - 21.09.2012

Hallo Samp-Community, i want to know how I can include the Sounds when I make or get any Damage.

I got this and it works perfectly, but only when I make damage, can anyone help me pls?:S:

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
        
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        
//PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        
return 1;




Re: "Ding"-Sound when you make/get Damage - HuSs3n - 21.09.2012

this will work
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
        PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        return 1;
}



AW: "Ding"-Sound when you make/get Damage - Saize - 21.09.2012

It works, but i want that it makes "Ding" too, when i get Damage^^


Re: "Ding"-Sound when you make/get Damage - CoDeZ - 21.09.2012

pawn Code:
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;
}
This one should work


AW: Re: "Ding"-Sound when you make/get Damage - Saize - 21.09.2012

Quote:
Originally Posted by CoDeZ
View Post
pawn Code:
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;
}
This one should work
I hear the Sound 2 times when i make any damage but not when i get any damage xD


Re: "Ding"-Sound when you make/get Damage - RedFusion - 22.09.2012

Don't use OnPlayerGiveDamage unless you've made a full script for it..
It's called when a player gives damage rather than taking, and players lose damage ONLY when they TAKE it, not when someone GIVES damage.


AW: "Ding"-Sound when you make/get Damage - Saize - 22.09.2012

Yes I mean, when I Take damage, but when I take damage from another Player.

BTW: That is not the Same Sound it is another one, but it is similar.


AW: "Ding"-Sound when you make/get Damage - Saize - 25.09.2012

/push.

Help me please

BTW: Is pushing of Threads allowed?


Re: "Ding"-Sound when you make/get Damage - Johndaonee - 25.09.2012

pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID) PlayerPlaySound(issuerid,17802,0.0,0.0,0.0), PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    return 1;
}



AW: Re: "Ding"-Sound when you make/get Damage - Saize - 25.09.2012

Quote:
Originally Posted by Johndaonee
View Post
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID) PlayerPlaySound(issuerid,17802,0.0,0.0,0.0), PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
    return 1;
}
I got that....
But i want a Sound when i make any Damage...