Raised This Month: $134 Target: $400
 33% 

[TF2] Smoke Weed Every Day (1.3)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Plugin ID:
1677
Plugin Version:
1.3
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Plays a very popular tune when medics heal with the kritzkrieg!
    Old 05-19-2010 , 11:50   [TF2] Smoke Weed Every Day (1.3)
    Reply With Quote #1

    Plays "Smoke weed every day" when medics 'illegally' inhale kritzkrieg beam! (aka kritzkrieg taunt)

    CONVARS
    • weed_version - Version of the plugin
    • weed_path (imgay/SmokeWeedErryDay.mp3) - Path of sound to play

    UPDATES
    1.3
    • Added weed_path
    1.22
    • Fixed a rare bug where the plugin wouldn't work
    1.21
    • Fixed a very rare bug when changing map
    1.2
    • Added addition ideas by retsam
    • Added spam prevention
    1.1
    • Fixed precache and download tables
    1.0
    • Release
    Attached Files
    File Type: zip sound.zip (27.8 KB, 2712 views)
    File Type: sp Get Plugin or Get Source (smokeweedeveryday.sp - 3055 views - 3.2 KB)
    __________________

    Last edited by Mecha the Slag; 05-31-2010 at 14:07.
    Mecha the Slag is offline
    Joe4evr
    Member
    Join Date: Apr 2010
    Old 05-19-2010 , 15:35   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #2

    Define "illegally".
    Joe4evr is offline
    Mecha the Slag
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 05-19-2010 , 15:38   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #3

    Quote:
    Originally Posted by Joe4evr View Post
    Define "illegally".
    it's just a bad joke
    when they use their kritzkrieg taunt.
    __________________
    Mecha the Slag is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 05-19-2010 , 19:34   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #4

    Does this plugin play the sound to everyone within a certain radius of the medic? Like the build in voice commands? Or does is play at full volume to the client only?
    Sreaper is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 05-19-2010 , 21:38   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #5

    Quote:
    Originally Posted by Sreaper View Post
    Does this plugin play the sound to everyone within a certain radius of the medic? Like the build in voice commands? Or does is play at full volume to the client only?
    PHP Code:
    EmitSoundToAll(WEED_SOUNDclient); 
    Everyone at full volume. Likely to get spammed though.
    noodleboy347 is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 05-20-2010 , 00:44   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #6

    I am not putting a sound file into an "imgay" directory.

    EDIT:

    Oh... I was just looking at your code...

    For one thing, you cant precache files OnPluginStart, that should be done on mapstart.

    Second. You need to add the file to downloads table, or no players will download it when they join the server.

    Last edited by retsam; 05-20-2010 at 01:03.
    retsam is offline
    Mecha the Slag
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 05-20-2010 , 02:31   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #7

    Quote:
    Originally Posted by noodleboy347 View Post
    PHP Code:
    EmitSoundToAll(WEED_SOUNDclient); 
    Everyone at full volume. Likely to get spammed though.
    I thought it would be emitted AT the client in the second parameter?
    EDIT: looking at other people's code, I think I can safely say it plays at the client and you can only hear it in a certain radius.

    Quote:
    Originally Posted by retsam View Post
    I am not putting a sound file into an "imgay" directory.
    that's the name of my server's clan
    International Master's Gaming Alliance (Yes!) [IM'GA(Y!)]

    Quote:
    Originally Posted by retsam View Post
    For one thing, you cant precache files OnPluginStart, that should be done on mapstart.

    Second. You need to add the file to downloads table, or no players will download it when they join the server.
    oops, I'll fix it XD

    EDIT: Updated!
    __________________

    Last edited by Mecha the Slag; 05-20-2010 at 02:45.
    Mecha the Slag is offline
    MisterNine
    Member
    Join Date: Jan 2010
    Old 05-20-2010 , 04:27   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #8

    I'm still trying to stop laughing.
    I'm Mr. Nine and I approve this message.

    Well done my friend.
    MisterNine is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 05-20-2010 , 05:47   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #9

    Ya. I recoded a handful of things myself.

    this: new String:input[512]; should be PLATFORM_MAX_PATH as far as I know.

    I also added TIMER_FLAG_NO_MAPCHANGE to the timer(not that big of a deal but itll make sure the timer callback isnt run if its in the middle of changing maps).

    Also, I moved some stuff around. Your taunt_timer, youre getting the clientweapon before checking if the clients are valid or alive. I thought that might cause errors.

    Anyways, the plugin is exploitable. Youll need to use some method to make sure they cant spam it. Small little flaw I noticed, if you jump off a ledge hitting the taunt key, itll exec many timers and spam(since the player isnt actually taunting while falling/jumping, so it bypasses the check). Should be a fairly easy fix though. I used a bool and check to fix this myself.

    Last edited by retsam; 05-20-2010 at 06:17.
    retsam is offline
    Mecha the Slag
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 05-20-2010 , 11:33   Re: [TF2] Smoke Weed Every Day
    Reply With Quote #10

    Fixed and updated!
    __________________
    Mecha the Slag 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 06:21.


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