Raised This Month: $32 Target: $400
 8% 

[TF2] Rociar (1.1.6, 2018.04.06) | Sound Spray Jingles


Post New Thread Reply   
 
Thread Tools Display Modes
Author
GHartmann
Junior Member
Join Date: Feb 2018
Plugin ID:
6020
Plugin Version:
1.1.6
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Meleeing players' sprays plays their cl_soundfile with cl_customsounds enabled
    Old 02-14-2018 , 16:07   [TF2] Rociar (1.1.6, 2018.04.06) | Sound Spray Jingles
    Reply With Quote #1

    Optional extension dependency: SMFFMPEG
    Used to toggle sound files based on their duration rather than a static timeout.

    Video demo:
    https://www.youtube.com/watch?v=n_MHcXqiD-8

    Usage:
    Players should have cl_customsounds 1 and cl_soundfile "path/to/some.wav" set.

    Features:
    Meleeing a player's spray will play that player's cl_soundfile (only for the player who hit it.)
    Meleeing the spray again will toggle the sound off, depending on SMFFMPEG availability.
    Fallback sound used if the meleeing player doesn't have custom sounds enabled.

    Commands:
    !sprays
    Reapplies all sprays that exist (fixes invisible sprays for clients who had not downloaded them at the time they were sprayed)
    Rechecks client's cl_customsounds value

    Admin commands:
    !sprays global
    Same as the above, except for every player on the server

    CVARS:
    sm_Rociar_SprayDistanceLimit 75.0
    Minimum allowed distance in hammer units between two sprays (as a sphere, not a square/cube)

    sm_Rociar_SpraySoundToggleTime 5
    Without smffmpeg:
    Time in seconds that meleeing a spray will toggle the sound off/on rather than replay
    With smffmpeg:
    0 = Disable toggle
    >0 = Enable toggle for the duration of the sound file

    sm_Rociar_CustomsoundsDisabled_Inform 1
    Inform the player if cl_customsounds is disabled when meleeing a spray
    0 = Do nothing
    1 = Tell them to use cl_customsounds 1, and the !sprays command to update

    sm_Rociar_CustomsoundsDisabled_Mode 1
    What to do if the player has cl_customsounds 0 and melees a spray
    0 = Nothing
    1 = Play the fallback sound
    2 = Attempt to play the customsound anyway
    3 = Play the fallback sound and attempt to play the customsound

    sm_Rociar_CustomsoundsDisabled_FallbackFile "ui/hitsound_retro2.wav"
    Which file to play if the player has cl_customsounds 0

    sm_Rociar_SpraycanNoiseFrequency 10
    Spraycan Noise Frequency
    0 = Disable noise entirely
    >0 = Wait N seconds between spraycan noise

    decalfrequency is used internally because the Player Decal event is hooked before it executes to prevent the spray sound from being spammed

    Version 1.1.6:
    Toggle time no longer set if the selected fallback mode doesn't result in (attempting to) play the jingle.

    Version 1.1.5:
    Fixed bug with StopSound not being able to target specific clients
    Added messages telling the player when a spray they've meleed does or does not have a jingle. Also tells the player how to give their own spray a jingle if they melee it without one.
    Added plugin tag to chat messages.
    Set chat spam timer to 0 as it likely isn't needed.
    Sounds now emit from the player's eye location to avoid sounds being muffled from within walls.
    Now includes prebuilt smx as I assumed an optional include would compile without. Oops.
    Attached Files
    File Type: gz rociar_1_1_6.tar.gz (17.7 KB, 472 views)

    Last edited by GHartmann; 04-06-2018 at 14:10. Reason: New version
    GHartmann is offline
    Nanochip
    Senior Member
    Join Date: Jan 2014
    Old 02-14-2018 , 19:47   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #2

    video demo?
    __________________
    Nanochip is offline
    GHartmann
    Junior Member
    Join Date: Feb 2018
    Old 02-14-2018 , 21:35   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #3

    Quote:
    Originally Posted by Nanochip View Post
    video demo?
    Sure! https://www.youtube.com/watch?v=n_MHcXqiD-8
    GHartmann is offline
    doroemon
    Senior Member
    Join Date: Dec 2009
    Location: TF2 AFK Server
    Old 02-23-2018 , 10:52   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #4

    It looks very cool!but does SMFFMPEG is work with window server?
    doroemon is offline
    GHartmann
    Junior Member
    Join Date: Feb 2018
    Old 02-23-2018 , 13:47   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #5

    Quote:
    Originally Posted by doroemon View Post
    It looks very cool!but does SMFFMPEG is work with window server?
    I haven't tested it on Windows, but I don't think it will work without porting since it uses Linux APIs for file access/permissions testing.

    SMFFMPEG is optional, though!

    Last edited by GHartmann; 02-23-2018 at 13:48.
    GHartmann is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 02-23-2018 , 21:02   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #6

    Neat idea.

    What benefits does having the sound's duration provide, if you can stop and start the sound by hitting the spray?
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    GHartmann
    Junior Member
    Join Date: Feb 2018
    Old 02-24-2018 , 06:20   Re: [TF2] Rociar (1.1.0, 2018.02.14) | Sound Spray Jingles
    Reply With Quote #7

    Quote:
    Originally Posted by FlaminSarge View Post
    Neat idea.

    What benefits does having the sound's duration provide, if you can stop and start the sound by hitting the spray?
    Without the sound's duration, the sound can only be toggled during sm_Rociar_SpraySoundToggleTime seconds, since there's no way afaik to determine for a client if a sound is currently playing.
    GHartmann is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 22:26.


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