"Ding"-Sound when you make/get Damage
#1

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;

Reply
#2

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;
}
Reply
#3

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

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
Reply
#5

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
Reply
#6

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.
Reply
#7

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.
Reply
#8

/push.

Help me please

BTW: Is pushing of Threads allowed?
Reply
#9

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;
}
Reply
#10

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)