AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Sank Sounds (Luke Sankey) (v1.8.4) (https://forums.alliedmods.net/showthread.php?t=5055)

bruzli 01-10-2012 15:02

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
i want snd_delay to be 0 but i want after 3 any consecutive sounds,nomatter what player plays them to display a message at any sounds from list and after 4 messages sounds can be hear again.

joaofr 02-01-2012 20:16

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
Hi!
I want to know if is there anyway to hide the keywords when the delay time is remaning. And only show the keywords when the delay time end.
So what I want is to HIDE the word that Will not be alble to play because the delay is configured to not allow them play.

If anyone can help me with this I will be greatfull :)
Thanks in advance

karlos 02-02-2012 11:07

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
the fastest solution is to replace:
Code:

if ( DISPLAY_KEYWORDS == 0 )
with:
Code:

if ( DISPLAY_KEYWORDS == 0
        || !( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) ) )

it should do what you desire

joaofr 02-02-2012 12:49

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
Quote:

Originally Posted by karlos (Post 1643110)
the fastest solution is to replace:
Code:

if ( DISPLAY_KEYWORDS == 0 )
with:
Code:

if ( DISPLAY_KEYWORDS == 0
        || !( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) ) )

it should do what you desire

Ive wrote wrong :S my mistake... Want I want is to HIDE the word that Will not be alble to play sound because the delay will not allow them play and show only the words that will play

karlos 02-02-2012 14:00

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
have you tried the above code?

ancient1 02-02-2012 15:23

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
Please repost the required files in standard zipped format.

Thanks.

Mike

joaofr 02-02-2012 18:44

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
Quote:

Originally Posted by karlos (Post 1643215)
have you tried the above code?

Yes Ive tried! but i dont know if I have to put DISPLAY_KEYWORDS 0 or 1 to work the way I want. Because I have DISPLAY_KEYWORDS "1" and continues to not hide the word that dont play sounds.

I think im quite there to rule this situation :) many thanks for now

karlos 02-03-2012 08:53

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
@ancient1
what is wrong with these files? 7zip is free and win/linux/xos
further it has much better compression

@joaofr
ok the code does not realy do what it should. sry i have not tested it.
this one does work. replace:
Code:

if ( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) )

with:
Code:

new allowedToPay = ( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) )
    if ( allowedToPay )

and
Code:

if ( DISPLAY_KEYWORDS == 0 )
with:
Code:

if ( DISPLAY_KEYWORDS == 0
        || !allowedToPay )


joaofr 02-03-2012 12:23

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
Quote:

Originally Posted by karlos (Post 1643655)
@joaofr
ok the code does not realy do what it should. sry i have not tested it.
this one does work. replace:
Code:

if ( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) )

with:
Code:

new allowedToPay = ( gametime > NextSoundTime + SND_DELAY
            || ( admin_flags & ADMIN_RCON
                && !(obey_duration_mode & 4) )
            || ( admin_flags & SND_IMMUNITY
                && !(obey_duration_mode & 2) )
            || ( !(obey_duration_mode & 1)
                && gametime > LastSoundTime + SND_DELAY ) )
    if ( allowedToPay )

and
Code:

if ( DISPLAY_KEYWORDS == 0 )
with:
Code:

if ( DISPLAY_KEYWORDS == 0
        || !allowedToPay )


didnt work at all :s.. the words are still appear on the chat when the delay is remaning :S

karlos 02-04-2012 12:17

Re: Sank Sounds (Luke Sankey) (v1.7.1)
 
the code i posted does work. i tested it. remember that it is for v1.7.1 (unmodified)


All times are GMT -4. The time now is 10:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.