[FilterScript] [0.3x] Hitting Sound.
#1

[0.3x] Hitting Sound


Hi all.
Today I'm going to release my first Filterscript on the sa-mp forums

Why did you make it?
Because I was bored. So I got the idea of making this.

What does it do?
Well, When you shoot a player, When you hit him you can hear a sound.

Why releasing it?
Because I think this is useful for Stunt/DM or TDM/DM servers.

Download Link?
The files are attached to the post

Please, Don't remove the credits
I hope this can be useful for you
Cheers,
Daniel
Reply
#2

Just saying (not leaving bad comments) but the sound will eventually get annoying down the line, tbh

Otherwise, nice job for your first!
Reply
#3

Quote:
Originally Posted by Brandon Javorsky
Посмотреть сообщение
Just saying (not leaving bad comments) but the sound will eventually get annoying down the line, tbh

Otherwise, nice job for your first!
That'd be easily combated with a simple toggle command!
Reply
#4

Quote:
Originally Posted by Brandon Javorsky
Посмотреть сообщение
Just saying (not leaving bad comments) but the sound will eventually get annoying down the line, tbh

Otherwise, nice job for your first!
Maybe it will :/
But thanks
Reply
#5

Actually this is wrong because you used OnPlayerGiveDamage. I mean if you hit opponent's skin (not lead shoot) you will hear sound but you wont hit him (if ping is high). So you have to use OnPlayerTakeDamage only and remove OnGivePlayerDamage.

pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new s[20];

    //The one who got damaged
    format(s, 20, "-Damage %.0f", amount);
    TextDrawSetString(TakeDamage[playerid], s);
    TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);

    //The one who damaged it
    format(s, 20, "+Damage %.0f", amount);
    TextDrawSetString(GiveDamage[issuerid], s);
    TextDrawShowForPlayer(issuerid, GiveDamage[issuerid]);
    PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", issuerid);
    return 1;
}
Reply
#6

Nice Job!
Reply
#7

Quote:
Originally Posted by Matz
Посмотреть сообщение
Actually this is wrong because you used OnPlayerGiveDamage. I mean if you hit opponent's skin (not lead shoot) you will hear sound but you wont hit him (if ping is high). So you have to use OnPlayerTakeDamage only and remove OnGivePlayerDamage.

pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new s[20];

    //The one who got damaged
    format(s, 20, "-Damage %.0f", amount);
    TextDrawSetString(TakeDamage[playerid], s);
    TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);

    //The one who damaged it
    format(s, 20, "+Damage %.0f", amount);
    TextDrawSetString(GiveDamage[issuerid], s);
    TextDrawShowForPlayer(issuerid, GiveDamage[issuerid]);
    PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
    SetTimerEx("DestruirTextoDraw", 1000, false, "i", issuerid);
    return 1;
}
Ohh yeah
Thanks for the warning
Reply
#8

Quote:
Originally Posted by Mac-10
Посмотреть сообщение
Nice Job!
Thanks
Reply
#9

Thanks for this.
Reply
#10

Just put
PHP код:
PlayerPlaySound(playerid64010.00.00.0
into
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)