[FilterScript] [0.3x] Hitting Sound.
#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


Messages In This Thread
[0.3x] Hitting Sound. - by [UG]Daniel - 23.02.2013, 20:37
Re: [0.3x] Hitting Sound. - by Guest9328472398472 - 24.02.2013, 03:57
Re: [0.3x] Hitting Sound. - by 2KY - 24.02.2013, 05:01
Re: [0.3x] Hitting Sound. - by [UG]Daniel - 24.02.2013, 08:25
Re: [0.3x] Hitting Sound. - by Matz - 24.02.2013, 20:18
Re: [0.3x] Hitting Sound. - by Mac-10 - 25.02.2013, 06:13
Re: [0.3x] Hitting Sound. - by [UG]Daniel - 25.02.2013, 18:16
Re: [0.3x] Hitting Sound. - by [UG]Daniel - 25.02.2013, 18:22
Re: [0.3x] Hitting Sound. - by NoahF - 20.06.2013, 11:03
Re: [0.3x] Hitting Sound. - by floydya - 21.06.2013, 05:40

Forum Jump:


Users browsing this thread: 1 Guest(s)