diff --git a/gamemodes/irresistible/cnr/features/damage_feed.pwn b/gamemodes/irresistible/cnr/features/damage_feed.pwn index b820593..03a7206 100644 --- a/gamemodes/irresistible/cnr/features/damage_feed.pwn +++ b/gamemodes/irresistible/cnr/features/damage_feed.pwn @@ -236,6 +236,16 @@ public OnPlayerTakenDamage( playerid, issuerid, Float: amount, weaponid, bodypar PlayerPlaySound( issuerid, g_HitmarkerSounds[ soundid ] [ E_SOUND_ID ], 0.0, 0.0, 0.0 ); } + + // play noise for admins + foreach ( new i : Player ) + { + if ( IsPlayerSpectatingPlayer( i, issuerid ) ) + { + new soundid = p_VIPLevel[ i ] ? p_HitmarkerSound{ i } : 0; + PlayerPlaySound( i, g_HitmarkerSounds[ soundid ] [ E_SOUND_ID ], 0.0, 0.0, 0.0 ); + } + } } DamageFeedAddHitTaken( playerid, issuerid, amount, weaponid ); @@ -282,6 +292,11 @@ stock DamageFeedAddHitTaken( playerid, issuerid, Float: amount, weaponid ) AddDamageHit( g_damageTaken[ playerid ], playerid, issuerid, amount, weaponid ); } +stock IsPlayerSpectatingPlayer( playerid, targetid ) +{ + return ( p_Spectating{ playerid } && p_whomSpectating[ playerid ] == targetid && playerid != targetid ); +} + stock UpdateDamageFeed( playerid, bool: modified = false ) { /* ** Core ** */