Counter-Strike 1.6 Icon CS1.6 Script

[AMXX][ALL] Spray Bug Fix

Hey Bro: We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Rj. points.
  • Post: Give Rj. your thoughts on this Script.
  • Vote: Help Rj. win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

31 lines | 789 bytes | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <amxmodx>
#include <fakemeta>

public plugin_init( )
{
    register_plugin( "Spray bug fix", "1.1", "Simo123" );

    register_forward( FM_EmitSound, "OnEmitSound" );
}

public OnEmitSound( const entity, const channel, const sound[ ] ) // Credits: Arkshine
{
    static const spraySound[] = "player/sprayer.wav";

    if( equal( sound, spraySound, charsmax( spraySound ) ) )
    {
        new player = pev( entity, pev_owner );

        new Float:origin[3];
        new Float:viewOfs[3];
       
        pev( player, pev_origin, origin );
        pev( player, pev_view_ofs, viewOfs );
       
        origin[0] += viewOfs[0];
        origin[1] += viewOfs[1];
        origin[2] += viewOfs[2];

        set_pev( entity, pev_origin, origin );
    }
}
Description
This plugin fixes spray/impulse 201 sound bug, when you're under for ex. an train on de_train map you couldn't hear the sound of your own spray or others. Fixes also a bug when you spray at a certain distance and the decal is not displayed.

Modules
-amxmodx
-fakemeta

Credits
Arkshine - A method that fixes decal at certain distance and sound bug.

Other info
It should work on other mods as well.

I made a fast video where the spray sound bug is shown,
(with and without fix).
http://youtu.be/gj-fFqi9oAo

Updated the plugin - 1.0 -> 1.1.
Fixes now decal distance bug
Spray sound bug fix -> Spray bug fix
Other method to fix those bugs

Tested with amxmodx 1.8.1 in Counter-Strike 1.6.

Comments

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
Simo123
AMXX Script/Codes

Submitter

Rj. avatar
Rj. Dreamin'
Member Joined 9 months ago
34 medals 4 legendary 8 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon

Rj.
Redistributor
Request Ownership
Send a Private Message to the submitter

Category

Attributes

Language
Pawn (AMXMODX)

Stats

Posts
0
Views
303
Date Added
29 days ago
Feb 26 2017 @ 6:49am UTC
Date Modified
29 days ago
Feb 26 2017 @ 7:06am UTC
Date Updated
29 days ago
Feb 26 2017 @ 6:49am UTC